auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>default void check() { if (meshProxy().isPresent()) { checkArgument(maxNumRetries() == 0, "If meshProxy is configured then maxNumRetries must be 0"); checkArgument(uris().size() == 1, "If meshProxy is configured then uris must contain exactly 1 URI"); } checkTimeoutPrecision(connectTimeout(), "connectTimeout"); <START> checkTimeoutPrecision(readTimeout(), "readTimeout"); <END> checkTimeoutPrecision(writeTimeout(), "writeTimeout"); }</code><technical_language>Thoughts keeping non-negative enforcement</technical_language>

Target:
default void check() { if (meshProxy().isPresent()) { checkArgument(maxNumRetries() == 0, "If meshProxy is configured then maxNumRetries must be 0"); checkArgument(uris().size() == 1, "If meshProxy is configured then uris must contain exactly 1 URI"); } checkTimeoutPrecision(connectTimeout(), "connectTimeout"); checkTimeoutPrecision(readTimeout(), "readTimeout"); checkTimeoutPrecision(writeTimeout(), "writeTimeout"); checkArgument(!failedUrlCooldown().isNegative(), "failedUrlCooldown may not be negative"); }
Source:
<code>private static void unTar(TarInputStream tarInputStream, File outputDir) { try { TarEntry tarEntry; while ((tarEntry = tarInputStream.getNextEntry()) != null) { final File file = new File(outputDir, tarEntry.getName()); if (tarEntry.isDirectory()) { if (!file.exists()) { if (!file.mkdirs()) { logger.error(file + " failure to create directory"); } } } else { <START> BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(file)); <END> try { int length; byte data[] = new byte[BUFFER_SIZE]; while ((length = tarInputStream.read(data, 0, BUFFER_SIZE)) != -1) { out.write(data, 0, length); } out.flush(); } finally { try { out.close(); } catch (IOException e) { logger.error(e.getMessage()); } } } } } catch (IOException e) { logger.error(e.getMessage()); } }</code><technical_language>for out: [try-with-resources-statement](<LINK_0></technical_language>

Target:
private static void unTar(TarInputStream tarInputStream, File outputDir) { try { TarEntry tarEntry; while ((tarEntry = tarInputStream.getNextEntry()) != null) { final File file = new File(outputDir, tarEntry.getName()); if (tarEntry.isDirectory()) { if (!file.exists()) { if (!file.mkdirs()) { logger.error(file + " failure to create directory"); } } } else { try (BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(file))) { int length; byte data[] = new byte[BUFFER_SIZE]; while ((length = tarInputStream.read(data, 0, BUFFER_SIZE)) != -1) { out.write(data, 0, length); } } catch (IOException e) { logger.error(e.getMessage()); } } } } catch (IOException e) { logger.error(e.getMessage()); } }
Source:
<code>public MessageViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { MessageBubbleDrawable bubbleDrawable; MessageView messageView; <START> if (viewType == 0) { <END> bubbleDrawable = new MessageBubbleDrawable(parent.getContext(), R.color.colorPrimaryLight, Gravity.END); messageView = (MessageView) inflater.inflate(R.layout.self_message_item_layout, parent, false); } else { bubbleDrawable = new MessageBubbleDrawable(parent.getContext(), R.color.bubble_grey, Gravity.START); messageView = (MessageView) inflater.inflate(R.layout.message_item_layout, parent, false); } messageView.setTextBackground(bubbleDrawable); return new MessageViewHolder(messageView); }</code><technical_language>I recommend extracting a VIEW_TYPE_MESSAGE_OTHER_USERS maybe? :) a VIEW_TYPE_MESSAGE_THIS_USER (else if it), else throw</technical_language>

Target:
public MessageViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { MessageBubbleDrawable bubbleDrawable; MessageView messageView; if (viewType == VIEW_TYPE_MESSAGE_THIS_USER) { bubbleDrawable = new MessageBubbleDrawable(parent.getContext(), R.color.colorPrimaryLight, Gravity.END); messageView = (MessageView) inflater.inflate(R.layout.self_message_item_layout, parent, false); } else if (viewType == VIEW_TYPE_MESSAGE_OTHER_USERS) { bubbleDrawable = new MessageBubbleDrawable(parent.getContext(), R.color.bubble_grey, Gravity.START); messageView = (MessageView) inflater.inflate(R.layout.message_item_layout, parent, false); } else { throw new DeveloperError("There is an unknown view type, you should inflate a view for it."); } messageView.setTextBackground(bubbleDrawable); return new MessageViewHolder(messageView); }
Source:
<code>int blockPlayerWin() { int equalCount = 0; int emptyI = 0, emptyJ = 0; <START> int winCombinationsNumber = fieldSize * 2 + 2; <END> for (int k = 0; k < winCombinationsNumber; k++) { equalCount = 0; for (int i = 0; i < fieldSize; i++) for (int j = 0; j < fieldSize; j++) { if (fieldArray[i][j] == playerMark && (getWinCombination(k, i, j) == 1)) { equalCount++; } if ((fieldArray[i][j] == EMPTY_MARK) && (getWinCombination(k, i, j) == 1)) { emptyI = i; emptyJ = j; } if ((fieldArray[i][j] == aIMark) && (getWinCombination(k, i, j) == 1)) { j = fieldSize; i = fieldSize; equalCount = 0; } } if (equalCount == (fieldSize - 1)) { return (emptyI * fieldSize + emptyJ); } } return NOTHING_TO_PREVENT; }</code><technical_language>is 2? final</technical_language>

Target:
int blockPlayerWin() { int equalCount = 0; int emptyI = 0, emptyJ = 0; int winCombinationsNumber = fieldSize * 2 + 2; for (int k = 0; k < winCombinationsNumber; k++) { equalCount = 0; for (int i = 0; i < fieldSize; i++) for (int j = 0; j < fieldSize; j++) { if (fieldArray[i][j] == playerMark && (getWinCombination(k, i, j) == BELONGS_TO_WIN_COMBINATION)) { equalCount++; } if ((fieldArray[i][j] == EMPTY_MARK) && (getWinCombination(k, i, j) == BELONGS_TO_WIN_COMBINATION)) { emptyI = i; emptyJ = j; } if ((fieldArray[i][j] == aIMark) && (getWinCombination(k, i, j) == BELONGS_TO_WIN_COMBINATION)) { j = fieldSize; i = fieldSize; equalCount = 0; } } if (equalCount == (fieldSize - 1)) { return (emptyI * fieldSize + emptyJ); } } return NOTHING_TO_PREVENT; }
Source:
<code>public static WindowsConfiguration create(final boolean provisionVMAgent, final WinRM winRM, final List<AdditionalUnattendContent> additionalUnattendContent, final boolean enableAutomaticUpdates) { return new AutoValue_VirtualMachineScaleSetOSProfile_WindowsConfiguration(provisionVMAgent, winRM, additionalUnattendContent, enableAutomaticUpdates); <START> } <END></code><technical_language>configuration classes extracted reused? similar existing ones</technical_language>

Target:
public static WindowsConfiguration create(final boolean provisionVMAgent, final WinRM winRM, final List<AdditionalUnattendContent> additionalUnattendContent, final boolean enableAutomaticUpdates) { return new AutoValue_VirtualMachineScaleSetOSProfile_WindowsConfiguration(provisionVMAgent, winRM, additionalUnattendContent == null ? ImmutableList.<AdditionalUnattendContent>of() : ImmutableList.copyOf(additionalUnattendContent), enableAutomaticUpdates); }
Source:
<code>public void maybeStopRequesting( StreamRTPManagerDesc streamRTPManager, int pt, byte[] buf, int off, int len) { if (remainingRetries == 0) { return; } Byte redPT = null, vp8PT = null; for (Map.Entry<Byte, MediaFormat> entry : streamRTPManager .streamRTPManager.getMediaStream().getDynamicRTPPayloadTypes() .entrySet()) { String encoding = entry.getValue().getEncoding(); if (Constants.VP8.equals(encoding)) { vp8PT = entry.getKey(); } else if (Constants.RED.equals(encoding)) { redPT = entry.getKey(); } } if (vp8PT == null || vp8PT != pt) { return; } RawPacket pkt = new RawPacket(buf, off, len); <START> if (!Utils.isKeyFrame(pkt, redPT, vp8PT)) <END> { return; } if (TRACE) { logger.trace("Stopping FIRs to ssrc=" + mediaSenderSSRC); } synchronized (this) { remainingRetries = 0; } }</code><technical_language>I get JRE is optimized for small short-lived allocations. I feel absolutely piece allocating a new RawPacket pass a util leave garbage collector... In mind, overloaded Utils.isKeyFrame takes byte[],int,int (in addition existing takes RawPacket) is OK. Anyway, I want do I wanted share mind</technical_language>

Target:
public void maybeStopRequesting( StreamRTPManagerDesc streamRTPManager, int pt, byte[] buf, int off, int len) { if (remainingRetries == 0) { return; } Byte redPT = null, vp8PT = null; for (Map.Entry<Byte, MediaFormat> entry : streamRTPManager .streamRTPManager.getMediaStream().getDynamicRTPPayloadTypes() .entrySet()) { String encoding = entry.getValue().getEncoding(); if (Constants.VP8.equals(encoding)) { vp8PT = entry.getKey(); } else if (Constants.RED.equals(encoding)) { redPT = entry.getKey(); } } if (vp8PT == null || vp8PT != pt) { return; } if (!Utils.isKeyFrame(buf, off, len, redPT, vp8PT)) { return; } if (TRACE) { logger.trace("Stopping FIRs to ssrc=" + mediaSenderSSRC); } synchronized (this) { remainingRetries = 0; } }
Source:
<code>static public byte[] decode(final String base32) { <START> return BaseEncoding.base32().decode(base32); <END> }</code><technical_language>This is throwing exception lowercase input in ContentDigestHistoryTest.testBasics()</technical_language>

Target:
static public byte[] decode(final String base32) { return BaseEncoding.base32() .omitPadding() .lowerCase() .decode(base32.toLowerCase()); }
Source:
<code>protected boolean getCPULoadEnabled() { <START> return m_model.getLoadMetersEnabled(); <END> }</code><technical_language>In current flows, a check is insure model is null. prudent check here, in case eventually called elsewhere</technical_language>

Target:
protected boolean getCPULoadEnabled() { return m_model == null ? false : m_model.getLoadMetersEnabled(); }
Source:
<code>private IJavaSearchScope getPackageAndOccurrencesWithoutNamesakesScope() { List<IJavaElement> scopeList= new ArrayList<>(); scopeList.add(fPackage); for (SearchResultGroup <START> fOccurrence : <END> fOccurrences) { ICompilationUnit cu= fOccurrence.getCompilationUnit(); if (cu == null) continue; IPackageFragment pack= (IPackageFragment) cu.getParent(); if (! pack.getElementName().equals(fPackage.getElementName())) scopeList.add(cu); } return SearchEngine.createJavaSearchScope(scopeList.toArray(new IJavaElement[scopeList.size()])); }</code><technical_language>rename occurrence</technical_language>

Target:
private IJavaSearchScope getPackageAndOccurrencesWithoutNamesakesScope() { List<IJavaElement> scopeList= new ArrayList<>(); scopeList.add(fPackage); for (SearchResultGroup occurrence : fOccurrences) { ICompilationUnit cu= occurrence.getCompilationUnit(); if (cu == null) continue; IPackageFragment pack= (IPackageFragment) cu.getParent(); if (! pack.getElementName().equals(fPackage.getElementName())) scopeList.add(cu); } return SearchEngine.createJavaSearchScope(scopeList.toArray(new IJavaElement[scopeList.size()])); }
Source:
<code>public void agentStatus() { <START> <END> }</code><technical_language>this empty line? :)</technical_language>

Target:
public String agentStatus() { return ""; }
Source:
<code>public void update(final DomainObject domainObject) { final CanvasHandler canvasHandler = session.getCanvasHandler(); final Diagram diagram = canvasHandler.getDiagram(); final Graph<?, Node> graph = diagram.getGraph(); <START> for (Node node : graph.nodes()) { <END> if (node.getContent() instanceof Definition) { final Definition definition = (Definition) node.getContent(); if (definition.getDefinition() instanceof DomainObject) { final DomainObject d = (DomainObject) definition.getDefinition(); if (Objects.equals(d.getDomainObjectUUID(), domainObject.getDomainObjectUUID())) { canvasElementUpdatedEvent.fire(new CanvasElementUpdatedEvent(canvasHandler, node)); } } } } }</code><technical_language>suggestion for (final Node node : graph.nodes()) {</technical_language>

Target:
public void update(final DomainObject domainObject) { final CanvasHandler canvasHandler = session.getCanvasHandler(); final Diagram diagram = canvasHandler.getDiagram(); final Graph<?, Node> graph = diagram.getGraph(); for (final Node node : graph.nodes()) { if (node.getContent() instanceof Definition) { final Definition definition = (Definition) node.getContent(); if (definition.getDefinition() instanceof DomainObject) { final DomainObject d = (DomainObject) definition.getDefinition(); if (Objects.equals(d.getDomainObjectUUID(), domainObject.getDomainObjectUUID())) { canvasElementUpdatedEvent.fire(new CanvasElementUpdatedEvent(canvasHandler, node)); } } } } }
Source:
<code>public CursorOperator(Context context, Uri uri, Scheduler.Worker scheduler, String[] projection, String selection, String[] selectionArgs, String sortOrder) { <START> this.context = context; <END> this.uri = uri; this.projection = projection; this.selection = selection; this.selectionArgs = selectionArgs; this.sortOrder = sortOrder; this.worker = scheduler; }</code><technical_language>this is dangerous introduce a context leak. Try avoid binding context strongly, do this.context = context.getApplicationContext()</technical_language>

Target:
public CursorOperator(Context context, Uri uri, Scheduler.Worker scheduler, String[] projection, String selection, String[] selectionArgs, String sortOrder) { this.resolver = context.getApplicationContext().getContentResolver(); this.uri = uri; this.projection = projection; this.selection = selection; this.selectionArgs = selectionArgs; this.sortOrder = sortOrder; this.worker = scheduler; }
Source:
<code>protected List<Guid> executeHSMGetStorageDomainsList(HSMGetStorageDomainsListVDSCommandParameters parameters) { <START> return (ArrayList<Guid>) runVdsCommand(VDSCommandType.HSMGetStorageDomainsList, parameters).getReturnValue(); <END> }</code><technical_language>cast List</technical_language>

Target:
protected List<Guid> executeHSMGetStorageDomainsList(HSMGetStorageDomainsListVDSCommandParameters parameters) { return (List<Guid>) runVdsCommand(VDSCommandType.HSMGetStorageDomainsList, parameters).getReturnValue(); }
Source:
<code>protected JsonErrorResult handleClientAlreadyExists(ClientAlreadyExistsException e) { <START> LOGGER.warn("A ClientAlreadyExistsException occurred", e); <END> return new JsonErrorResult(HttpStatus.CONFLICT.name(), e.getMessage()); }</code><technical_language>Well, Exception occurred is easily visible delivered exception. if I stack trace here, I prefer a log message, do of "Tried add client id %id twice"</technical_language>

Target:
protected JsonErrorResult handleClientAlreadyExists(ClientAlreadyExistsException e) { LOGGER.warn(e.getMessage()); return new JsonErrorResult(HttpStatus.CONFLICT.name(), e.getMessage()); }
Source:
<code>public void testFacetParams() { List<NameValuePair> actual = buildFacetParams("journal", "foo", true); SetMultimap<String, String> actualMap = convertToMap(actual); assertFacetParams(2, actualMap); assertSingle("journal", actualMap.get("facet.field")); assertSingle("dismax", actualMap.get("defType")); assertSingle("foo", actualMap.get("q")); actual = buildFacetParams("journal", "*:*", false); actualMap = convertToMap(actual); assertFacetParams(2, actualMap); assertSingle("journal", actualMap.get("facet.field")); assertEquals(actualMap.get("defType").size(), 0); assertSingle("*:*", actualMap.get("q")); ArticleSearchQuery.Facet facet = ArticleSearchQuery.Facet.builder() .setField("foo") .setExcludeKey("bar") .build(); ArticleSearchQuery asq = ArticleSearchQuery.builder() .addFacet(facet) .setQuery("query") .build(); actual = SolrQueryBuilder.buildParameters(asq); actualMap = convertToMap(actual); <START> System.out.println(actualMap.get("facet.field")); <END> assertSingle("{!ex=bar}foo", actualMap.get("facet.field")); assertSingle("query", actualMap.get("q")); }</code><technical_language>logging</technical_language>

Target:
public void testFacetParams() { List<NameValuePair> actual = buildFacetParams("journal", "foo", true); SetMultimap<String, String> actualMap = convertToMap(actual); assertFacetParams(2, actualMap); assertSingle("journal", actualMap.get("facet.field")); assertSingle("dismax", actualMap.get("defType")); assertSingle("foo", actualMap.get("q")); actual = buildFacetParams("journal", "*:*", false); actualMap = convertToMap(actual); assertFacetParams(2, actualMap); assertSingle("journal", actualMap.get("facet.field")); assertEquals(actualMap.get("defType").size(), 0); assertSingle("*:*", actualMap.get("q")); ArticleSearchQuery.Facet facet = ArticleSearchQuery.Facet.builder() .setField("foo") .setExcludeKey("bar") .build(); ArticleSearchQuery asq = ArticleSearchQuery.builder() .addFacet(facet) .setQuery("query") .build(); actual = SolrQueryBuilder.buildParameters(asq); actualMap = convertToMap(actual); assertSingle("{!ex=bar}foo", actualMap.get("facet.field")); assertSingle("query", actualMap.get("q")); }
Source:
<code>public void testList() { publicIps = publicIpApi().getList(); assertNotNull(publicIps); assertFalse(publicIps.isEmpty()); <START> Assert.assertTrue(publicIps.size() > 0); <END> }</code><technical_language>This is redundant</technical_language>

Target:
public void testList() { publicIps = publicIpApi().list(); Assert.assertTrue(publicIps.size() > 0); }
Source:
<code>protected URLConnection connect(DownloadJob job, URL src) throws IOException { URLConnection conn = ProxyConfiguration.open(src); if(conn instanceof HttpURLConnection) { HttpURLConnection httpConn = (HttpURLConnection) conn; if (httpConn.getResponseCode() == HttpURLConnection.HTTP_MOVED_TEMP || httpConn.getResponseCode() == HttpURLConnection.HTTP_MOVED_PERM) { conn = connect(job, new URL(httpConn.getHeaderField("location"))); <START> IOUtils.closeQuietly(httpConn.getInputStream()); <END> } } return conn; }</code><technical_language>closed exceptional paths. Please Util.closeAndLogFailures() instead, want report issue in logs</technical_language>

Target:
protected URLConnection connect(DownloadJob job, URL src) throws IOException { URLConnection conn = ProxyConfiguration.open(src); if(conn instanceof HttpURLConnection) { HttpURLConnection httpConn = (HttpURLConnection) conn; if (httpConn.getResponseCode() == HttpURLConnection.HTTP_MOVED_TEMP || httpConn.getResponseCode() == HttpURLConnection.HTTP_MOVED_PERM) { try { URL redirectUrl = new URL(httpConn.getHeaderField("location")); conn = connect(job, redirectUrl); } finally { Util.closeAndLogFailures(httpConn.getInputStream(), LOGGER, job.getDestination().getName(), src.toString()); } } } return conn; }
Source:
<code>public String getServerMOTD() { try { StringBuffer mOTD = new StringBuffer(); <START> FileReader reader = new FileReader("motd.md"); <END> BufferedReader bufferedReader = new BufferedReader(reader); String line; while ((line = bufferedReader.readLine()) != null) { mOTD.append(line); } serverMOTD = mOTD.toString(); return serverMOTD; } catch (IOException e) { return serverMOTD; } }</code><technical_language>This file reader closed. enclude is bad is platform specific. UTF-8</technical_language>

Target:
public String getServerMOTD() { try { StringBuffer mOTD = new StringBuffer(); InputStreamReader reader = new InputStreamReader(new FileInputStream("motd.md"), "UTF8"); BufferedReader bufferedReader = new BufferedReader(reader); String line; while ((line = bufferedReader.readLine()) != null) { mOTD.append(line); } reader.close(); serverMOTD = mOTD.toString(); return serverMOTD; } catch (IOException e) { return serverMOTD; } }
Source:
<code>public ResourceBundle getBundle(String baseName, Locale locale) { File resourceBundleDir = resourceBundleBaseDir; if (resourceBundleDir == null) { <START> resourceBundleDir = new File(String.format("%s/etc/i18n/", System.getProperty("ddf.home"))); <END> } try { URL[] urls = {resourceBundleDir.toURI().toURL()}; try (URLClassLoader loader = new URLClassLoader(urls)) { return ResourceBundle.getBundle(baseName, locale, loader); } } catch (MalformedURLException e) { throw new MissingResourceException( "An error occurred while loading ResourceBundle: " + baseName + "," + locale.getCountry(), getClass().getName(), baseName); } catch (IOException e) { throw new MissingResourceException( "An error occurred while creating class loader to URL for ResourceBundle: " + baseName + "," + locale.getCountry(), getClass().getName(), baseName); } }</code><technical_language>path is Linux specific</technical_language>

Target:
public ResourceBundle getBundle(String baseName, Locale locale) throws IOException { File resourceBundleDir = Paths.get(resourceBundleBaseDir.toString(), baseName).toFile(); URL[] urls = {resourceBundleDir.toURI().toURL()}; try (URLClassLoader loader = AccessController.doPrivileged( (PrivilegedAction<URLClassLoader>) () -> new URLClassLoader(urls))) { return ResourceBundle.getBundle(baseName, locale, loader); } }
Source:
<code>private static String buildPrefix(String message) { <START> return message != null && message.length() != 0 ? message + " ==> " : ""; <END> }</code><technical_language>please replace ==> unobstrusive a colon :. Thanks</technical_language>

Target:
private static String buildPrefix(String message) { return message != null && message.length() != 0 ? message + ": " : ""; }
Source:
<code>public Response add(Disk disk) { if (QueryHelper.hasMatrixParam(getUriInfo(), UNREGISTERED_CONSTRAINT_PARAMETER)) { GetUnregisteredDiskQueryParameters getDiskParams = new GetUnregisteredDiskQueryParameters( asGuid(disk.getId()), storageDomainId, getStoragePoolIdForDomain(storageDomainId)); DiskImage unregisteredDisk = getEntity(DiskImage.class, VdcQueryType.GetUnregisteredDisk, getDiskParams, disk.getId()); <START> unregisteredDisk.setDiskAlias(disk.getAlias()); <END> RegisterDiskParameters registerDiskParams = new RegisterDiskParameters(unregisteredDisk); return performCreate(VdcActionType.RegisterDisk, registerDiskParams, ID_RESOLVER); } else { validateDiskForCreation(disk); AddDiskParameters params = new AddDiskParameters(); params.setDiskInfo(getMapper(Disk.class, org.ovirt.engine.core.common.businessentities.Disk.class).map( disk, null)); params.setStorageDomainId(this.storageDomainId); return performCreate(VdcActionType.AddDisk, params, ID_RESOLVER); } }</code><technical_language>this logic resides in DiskMapper, mapping new DiskImage disk unregisteredDisk a template. mapper properties defined user eventually get in unregisteredDisk send backend</technical_language>

Target:
public Response add(Disk disk) { if (QueryHelper.hasMatrixParam(getUriInfo(), UNREGISTERED_CONSTRAINT_PARAMETER)) { GetUnregisteredDiskQueryParameters getDiskParams = new GetUnregisteredDiskQueryParameters( asGuid(disk.getId()), storageDomainId, getStoragePoolIdForDomain(storageDomainId)); DiskImage unregisteredDisk = getEntity(DiskImage.class, VdcQueryType.GetUnregisteredDisk, getDiskParams, disk.getId()); unregisteredDisk = (DiskImage) getMapper(Disk.class, org.ovirt.engine.core.common.businessentities.Disk.class).map(disk, unregisteredDisk); RegisterDiskParameters registerDiskParams = new RegisterDiskParameters(unregisteredDisk); return performCreate(VdcActionType.RegisterDisk, registerDiskParams, ID_RESOLVER); } else { validateDiskForCreation(disk); AddDiskParameters params = new AddDiskParameters(); params.setDiskInfo(getMapper(Disk.class, org.ovirt.engine.core.common.businessentities.Disk.class).map( disk, null)); params.setStorageDomainId(this.storageDomainId); return performCreate(VdcActionType.AddDisk, params, ID_RESOLVER); } }
Source:
<code>public PlanNode replaceChildren(List<PlanNode> newChildren) { checkArgument(newChildren.size() == 2, "expected newChildren to contain 2 nodes"); PlanNode newLeft = newChildren.get(0); PlanNode newRight = newChildren.get(1); List<Symbol> newOutputSymbols = outputSymbols; if (isCrossJoin()) { Set<Symbol> outputSymbolSet = new HashSet<>(outputSymbols); newOutputSymbols = Stream.concat(newLeft.getOutputSymbols().stream(), newRight.getOutputSymbols().stream()) .filter(outputSymbolSet::contains) .collect(toImmutableList()); <START> } <END> return new JoinNode(getId(), type, newLeft, newRight, criteria, newOutputSymbols, filter, leftHashSymbol, rightHashSymbol, distributionType); }</code><technical_language>I remove this shuffling all. CC: @sopel39</technical_language>

Target:
public PlanNode replaceChildren(List<PlanNode> newChildren) { checkArgument(newChildren.size() == 2, "expected newChildren to contain 2 nodes"); return new JoinNode(getId(), type, newChildren.get(0), newChildren.get(1), criteria, outputSymbols, filter, leftHashSymbol, rightHashSymbol, distributionType); }
Source:
<code><START> private List<Pair<List<Statement>, List<Statement>>> getSwitchStructure(final SwitchStatement node) { <END> final List<Pair<List<Statement>, List<Statement>>> switchStructure = new ArrayList<Pair<List<Statement>, List<Statement>>>(); Pair<List<Statement>, List<Statement>> currentCase = Pair.<List<Statement>, List<Statement>>of(new ArrayList<Statement>(), new ArrayList<Statement>()); for (final Object oneStatement : node.statements()) { if (oneStatement instanceof SwitchCase) { final SwitchCase oneSwitchCase = (SwitchCase) oneStatement; if (!currentCase.getSecond().isEmpty()) { switchStructure.add(currentCase); currentCase = Pair.<List<Statement>, List<Statement>>of( new ArrayList<Statement>(), new ArrayList<Statement>()); } currentCase.getFirst().add(oneSwitchCase); } else { currentCase.getSecond().add((Statement) oneStatement); } } if (!currentCase.getFirst().isEmpty()) { switchStructure.add(currentCase); } return switchStructure; }</code><technical_language>I hitting limits of genericity. Please consider extracting a class replace Pair<List<Statement>, List<Statement>>. This 1) reading code, move a methods this type</technical_language>

Target:
private List<SwitchCaseSection> getSwitchStructure(final SwitchStatement node) { final List<SwitchCaseSection> switchStructure = new ArrayList<SwitchCaseSection>(); SwitchCaseSection currentCase = new SwitchCaseSection(); for (final Object oneStatement : node.statements()) { if (oneStatement instanceof SwitchCase) { final SwitchCase oneSwitchCase = (SwitchCase) oneStatement; if (!currentCase.stmts.isEmpty()) { switchStructure.add(currentCase); currentCase = new SwitchCaseSection(); } currentCase.existingCases.add(oneSwitchCase); } else { currentCase.stmts.add((Statement) oneStatement); } } if (!currentCase.existingCases.isEmpty()) { switchStructure.add(currentCase); } return switchStructure; }
Source:
<code>public IdentifierSource newObject() { <START> return new SequentialIdentifierGenerator(); <END> }</code><technical_language>For above, Context.getService(IdentifierSourceService.class).getProviderByUuid(getUuidProperty());</technical_language>

Target:
public IdentifierSource newObject() { return Context.getService(IdentifierSourceService.class).getIdentifierSourceByUuid(getUuidProperty()); }
Source:
<code>public final void renderTileEntityAt(T tile, double x, double y, double z, float partialTicks, int destroyStage) { Tessellator tessellator = Tessellator.getInstance(); VertexBuffer VertexBuffer = tessellator.getBuffer(); this.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); RenderHelper.disableStandardItemLighting(); GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GlStateManager.enableBlend(); GlStateManager.enableCull(); if(Minecraft.isAmbientOcclusionEnabled()) { GlStateManager.shadeModel(GL11.GL_SMOOTH); } else { GlStateManager.shadeModel(GL11.GL_FLAT); } VertexBuffer.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK); renderTileEntityFast(tile, x, y, z, partialTicks, destroyStage, VertexBuffer); VertexBuffer.setTranslation(0, 0, 0); tessellator.draw(); RenderHelper.enableStandardItemLighting(); <START> } <END></code><technical_language>this work - FastTESR is fast forge a global VertexBuffer (in TileEntityRenderBuffer). This method is called non-fast TESR stuffs</technical_language>

Target:
public void renderTileEntityAt(T tile, double x, double y, double z, float partialTicks, int destroyStage) { Tessellator tessellator = Tessellator.getInstance(); VertexBuffer VertexBuffer = tessellator.getBuffer(); this.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); RenderHelper.disableStandardItemLighting(); GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GlStateManager.enableBlend(); GlStateManager.enableCull(); if(Minecraft.isAmbientOcclusionEnabled()) { GlStateManager.shadeModel(GL11.GL_SMOOTH); } else { GlStateManager.shadeModel(GL11.GL_FLAT); } VertexBuffer.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK); renderTileEntityFast(tile, x, y, z, partialTicks, destroyStage, VertexBuffer); VertexBuffer.setTranslation(0, 0, 0); tessellator.draw(); RenderHelper.enableStandardItemLighting(); }
Source:
<code>protected void promoteToMaster() { if (!running) { LOG.warn("Ignoring promote-to-master request, as HighAvailabilityManager is no longer running"); return; } if (promotionListener != null) { try { promotionListener.promotingToMaster(); } catch (Exception e) { Exceptions.propagateIfFatal(e); LOG.warn("Problem in promption-listener (continuing)", e); } } nodeState = ManagementNodeState.MASTER; publishPromotionToMaster(); try { managementContext.getRebindManager().rebind(); } catch (Exception e) { LOG.info("Problem during rebind when promoting node to master; demoting to failed and rethrowing): "+e); nodeState = ManagementNodeState.FAILED; publishDemotionFromMaterOnFailure(); throw Exceptions.propagate(e); <START> <END> } managementContext.getRebindManager().start(); }</code><technical_language>Delete blank line</technical_language>

Target:
protected void promoteToMaster() { if (!running) { LOG.warn("Ignoring promote-to-master request, as HighAvailabilityManager is no longer running"); return; } if (promotionListener != null) { try { promotionListener.promotingToMaster(); } catch (Exception e) { Exceptions.propagateIfFatal(e); LOG.warn("Problem in promption-listener (continuing)", e); } } nodeState = ManagementNodeState.MASTER; publishPromotionToMaster(); try { managementContext.getRebindManager().rebind(); } catch (Exception e) { LOG.info("Problem during rebind when promoting node to master; demoting to failed and rethrowing): "+e); nodeState = ManagementNodeState.FAILED; publishDemotionFromMasterOnFailure(); throw Exceptions.propagate(e); } managementContext.getRebindManager().start(); }
Source:
<code>public void testCreateUserPrincipal() { <START> AADJwtBearerTokenAuthenticationConverter aadJwtBearerTokenAuthenticationConverter <END> = new AADJwtBearerTokenAuthenticationConverter(); AbstractAuthenticationToken authenticationToken = aadJwtBearerTokenAuthenticationConverter.convert(jwt); assertThat(authenticationToken.getPrincipal()).isExactlyInstanceOf(AADOAuth2AuthenticatedPrincipal.class); AADOAuth2AuthenticatedPrincipal principal = (AADOAuth2AuthenticatedPrincipal) authenticationToken .getPrincipal(); assertThat(principal.getClaims()).isNotEmpty(); assertThat(principal.getIssuer()).isEqualTo(claims.get("iss")); assertThat(principal.getTenantId()).isEqualTo(claims.get("tid")); }</code><technical_language>Rename aadJwtBearerTokenAuthenticationConverter converter</technical_language>

Target:
public void testCreateUserPrincipal() { AADJwtBearerTokenAuthenticationConverter converter = new AADJwtBearerTokenAuthenticationConverter(); AbstractAuthenticationToken authenticationToken = converter.convert(jwt); assertThat(authenticationToken.getPrincipal()).isExactlyInstanceOf(AADOAuth2AuthenticatedPrincipal.class); AADOAuth2AuthenticatedPrincipal principal = (AADOAuth2AuthenticatedPrincipal) authenticationToken .getPrincipal(); assertThat(principal.getClaims()).isNotEmpty(); assertThat(principal.getIssuer()).isEqualTo(claims.get("iss")); assertThat(principal.getTenantId()).isEqualTo(claims.get("tid")); }
Source:
<code><START> public void compute(final Vertex<Double, Void> vertex, final Iterable<Double> messages) { <END> if (getSuperstep() == 0) { vertex.setValue(1d); } else { final double sum = messages == null ? 0d : Lists.newArrayList(messages).stream().mapToDouble(Double::doubleValue).sum(); vertex.setValue((1 - DAMPING_FACTOR) + DAMPING_FACTOR * sum); } if (getSuperstep() < NUM_TOTAL_SUPERSTEP) { getMsgFutureList().addAll(sendMessagesToAdjacents(vertex, vertex.getValue() / vertex.getNumEdges())); } else { vertex.voteToHalt(); } }</code><technical_language>gonna allow null for messages not? In [L56](<LINK_1>, assumes messages null. [L69 in ComputationCallable.java](<LINK_0>, handle pass null value. Please consistent</technical_language>

Target:
public void compute(final Vertex<Double, Void> vertex, final Iterable<Double> messages) { if (getSuperstep() == 0) { vertex.setValue(1d); } else { double sum = 0.0; for (final Double message : messages) { sum += message; } vertex.setValue((1 - DAMPING_FACTOR) + DAMPING_FACTOR * sum); } if (getSuperstep() < NUM_TOTAL_SUPERSTEP) { sendMessagesToAdjacents(vertex, vertex.getValue() / vertex.getNumEdges()); } else { vertex.voteToHalt(); } }
Source:
<code>public ConnectorPageSource createPageSource( ConnectorTransactionHandle transactionHandle, ConnectorSession session, ConnectorSplit split, List<ColumnHandle> columns, SplitContext splitContext) { RaptorSplit raptorSplit = (RaptorSplit) split; <START> HiveFileContext hiveFileContext = DEFAULT_HIVE_FILE_CONTEXT; END> OptionalInt bucketNumber = raptorSplit.getBucketNumber(); TupleDomain<RaptorColumnHandle> predicate = raptorSplit.getEffectivePredicate(); ReaderAttributes attributes = ReaderAttributes.from(session); OptionalLong transactionId = raptorSplit.getTransactionId(); Optional<Map<String, Type>> columnTypes = raptorSplit.getColumnTypes(); boolean tableSupportsDeltaDelete = raptorSplit.isTableSupportsDeltaDelete(); FileSystemContext context = new FileSystemContext(session); Map<UUID, UUID> shardDeltaMap = raptorSplit.getShardDeltaMap(); if (raptorSplit.getShardUuids().size() == 1) { UUID shardUuid = raptorSplit.getShardUuids().iterator().next(); return createPageSource( context, hiveFileContext, shardUuid, Optional.ofNullable(shardDeltaMap.get(shardUuid)), tableSupportsDeltaDelete, bucketNumber, columns, predicate, attributes, transactionId, columnTypes); } Iterator<ConnectorPageSource> iterator = raptorSplit.getShardUuids().stream() .map(shardUuid -> createPageSource( context, hiveFileContext, shardUuid, Optional.ofNullable(shardDeltaMap.get(shardUuid)), tableSupportsDeltaDelete, bucketNumber, columns, predicate, attributes, transactionId, columnTypes)) .iterator(); return new ConcatPageSource(iterator); }</code><technical_language>fix this other places</technical_language>

Target:
public ConnectorPageSource createPageSource( ConnectorTransactionHandle transactionHandle, ConnectorSession session, ConnectorSplit split, List<ColumnHandle> columns, SplitContext splitContext) { RaptorSplit raptorSplit = (RaptorSplit) split; HiveFileContext hiveFileContext = new HiveFileContext(splitContext.isCacheable(), Optional.empty()); OptionalInt bucketNumber = raptorSplit.getBucketNumber(); TupleDomain<RaptorColumnHandle> predicate = raptorSplit.getEffectivePredicate(); ReaderAttributes attributes = ReaderAttributes.from(session); OptionalLong transactionId = raptorSplit.getTransactionId(); Optional<Map<String, Type>> columnTypes = raptorSplit.getColumnTypes(); boolean tableSupportsDeltaDelete = raptorSplit.isTableSupportsDeltaDelete(); FileSystemContext context = new FileSystemContext(session); Map<UUID, UUID> shardDeltaMap = raptorSplit.getShardDeltaMap(); if (raptorSplit.getShardUuids().size() == 1) { UUID shardUuid = raptorSplit.getShardUuids().iterator().next(); return createPageSource( context, hiveFileContext, shardUuid, Optional.ofNullable(shardDeltaMap.get(shardUuid)), tableSupportsDeltaDelete, bucketNumber, columns, predicate, attributes, transactionId, columnTypes); } Iterator<ConnectorPageSource> iterator = raptorSplit.getShardUuids().stream() .map(shardUuid -> createPageSource( context, hiveFileContext, shardUuid, Optional.ofNullable(shardDeltaMap.get(shardUuid)), tableSupportsDeltaDelete, bucketNumber, columns, predicate, attributes, transactionId, columnTypes)) .iterator(); return new ConcatPageSource(iterator); }
Source:
<code>public List<CloudBlobMetadata> purgeBlobs(List<CloudBlobMetadata> blobMetadataList) throws BlobStorageException { List<CloudBlobMetadata> deletedBlobs = new ArrayList<>(); List<List<CloudBlobMetadata>> partitionedLists = Lists.partition(blobMetadataList, purgeBatchSize); <START> for (List<CloudBlobMetadata> someBlobs : partitionedLists) { <END> BlobBatch blobBatch = blobBatchClient.getBlobBatch(); List<Response<Void>> responseList = new ArrayList<>(); for (CloudBlobMetadata blobMetadata : someBlobs) { String containerName = getAzureContainerName(blobMetadata); String blobName = getAzureBlobName(blobMetadata); responseList.add(blobBatch.deleteBlob(containerName, blobName)); } blobBatchClient.submitBatchWithResponse(blobBatch, false, Duration.ofHours(1), Context.NONE); for (int j = 0; j < responseList.size(); j++) { Response<Void> response = responseList.get(j); CloudBlobMetadata blobMetadata = someBlobs.get(j); int statusCode; try { statusCode = response.getStatusCode(); } catch (BlobStorageException bex) { statusCode = bex.getStatusCode(); } switch (statusCode) { case HttpURLConnection.HTTP_OK: case HttpURLConnection.HTTP_ACCEPTED: case HttpURLConnection.HTTP_NOT_FOUND: case HttpURLConnection.HTTP_GONE: deletedBlobs.add(blobMetadata); break; default: logger.error("Deleting blob got status {}", blobMetadata.getId(), statusCode); } } } return deletedBlobs; }</code><technical_language>minor-XXS: rename "someBlobs" "batchofBlobs"</technical_language>

Target:
public List<CloudBlobMetadata> purgeBlobs(List<CloudBlobMetadata> blobMetadataList) throws BlobStorageException { List<CloudBlobMetadata> deletedBlobs = new ArrayList<>(); List<List<CloudBlobMetadata>> partitionedLists = Utils.partitionList(blobMetadataList, purgeBatchSize); for (List<CloudBlobMetadata> batchOfBlobs : partitionedLists) { BlobBatch blobBatch = blobBatchClient.getBlobBatch(); List<Response<Void>> responseList = new ArrayList<>(); for (CloudBlobMetadata blobMetadata : batchOfBlobs) { String containerName = getAzureContainerName(blobMetadata); String blobName = getAzureBlobName(blobMetadata); responseList.add(blobBatch.deleteBlob(containerName, blobName)); } blobBatchClient.submitBatchWithResponse(blobBatch, false, Duration.ofSeconds(batchPurgeTimeoutSec), Context.NONE); for (int j = 0; j < responseList.size(); j++) { Response<Void> response = responseList.get(j); CloudBlobMetadata blobMetadata = batchOfBlobs.get(j); int statusCode; try { statusCode = response.getStatusCode(); } catch (BlobStorageException bex) { statusCode = bex.getStatusCode(); } switch (statusCode) { case HttpURLConnection.HTTP_OK: case HttpURLConnection.HTTP_ACCEPTED: case HttpURLConnection.HTTP_NOT_FOUND: case HttpURLConnection.HTTP_GONE: deletedBlobs.add(blobMetadata); break; default: logger.error("Deleting blob got status {}", blobMetadata.getId(), statusCode); } } } return deletedBlobs; }
Source:
<code>private int calculateRunSize(int sizeIdx) { int maxElements = 1 << pageShifts - SizeClasses.LOG2_QUANTUM; <START> int runSize = 0, nElements; <END> final int elemSize = arena.sizeIdx2size(sizeIdx); do { runSize += pageSize; nElements = runSize / elemSize; if (nElements >= maxElements) { break; } } while (runSize != nElements * elemSize); while (nElements > maxElements) { runSize -= pageSize; nElements = runSize / elemSize; } assert nElements > 0; assert runSize <= chunkSize; assert runSize >= elemSize; return runSize; }</code><technical_language>please line declaration do in netty</technical_language>

Target:
private int calculateRunSize(int sizeIdx) { int maxElements = 1 << pageShifts - SizeClasses.LOG2_QUANTUM; int runSize = 0; int nElements; final int elemSize = arena.sizeIdx2size(sizeIdx); do { runSize += pageSize; nElements = runSize / elemSize; } while (nElements < maxElements && runSize != nElements * elemSize); while (nElements > maxElements) { runSize -= pageSize; nElements = runSize / elemSize; } assert nElements > 0; assert runSize <= chunkSize; assert runSize >= elemSize; return runSize; }
Source:
<code>public Trader(String name, double cashInHand) { <START> super(); <END> this.name = name; this.cashInHand = cashInHand; this.position = new ArrayList<Order>(); this.ordersPlaced = new ArrayList<Order>(); }</code><technical_language>Is this necessary</technical_language>

Target:
public Trader(String name, double cashInHand) { this.name = name; this.cashInHand = cashInHand; this.position = new ArrayList<Order>(); this.ordersPlaced = new ArrayList<Order>(); }
Source:
<code>private void reset() { probeIndexBuilder.reset(); <START> buildPageBuilder.reset(); <END> if (reachedProbeEnd) { probe = null; } }</code><technical_language>if reset is called reached end of probe</technical_language>

Target:
private void reset() { probeIndexBuilder.clear(); buildPageBuilder.reset(); if (reachedProbeEnd) { probe = null; } }
Source:
<code>public static String messagesToJson(Project project, String... additionalTags) { if (project == null) { return emptyJSON; } List<String> tags = new ArrayList<>(); tags.addAll(Arrays.asList(additionalTags)); tags.add(project.getName()); <START> project.getGroups().stream().forEach((Group t) -> { <END> tags.add(t.getName()); }); return messagesToJson(tags); }</code><technical_language>rewrite java project.getGroups().stream().map(Group::getName).forEach(tags::add); ? I wrote correctly (no IDE suggestions :D )</technical_language>

Target:
public static String messagesToJson(Project project, String... additionalTags) { if (project == null) { return JSONable.EMPTY; } List<String> tags = new ArrayList<>(); tags.addAll(Arrays.asList(additionalTags)); tags.add(project.getName()); project.getGroups().stream().map(Group::getName).forEach(tags::add); return messagesToJson(tags); }
Source:
<code>public String getConfirmationLink() { String ref = ""; if (institute == null) { ref = Const.ActionURIs.INSTRUCTOR_COURSE_JOIN_AUTHENTICATED + "?key=" + regkey; } else { ref = Const.ActionURIs.INSTRUCTOR_COURSE_JOIN_AUTHENTICATED <START> + "?key=" + regkey + "&" <END> + Const.ParamsNames.INSTRUCTOR_INSTITUTION + "=" + Sanitizer.sanitizeForUri(institute); } return ref; }</code><technical_language>set Const.ActionURIs.INSTRUCTOR_COURSE_JOIN_AUTHENTICATED + "?key=" + regkey append rest if institute != null</technical_language>

Target:
public String getConfirmationLink() { String ref = Const.ActionURIs.INSTRUCTOR_COURSE_JOIN_AUTHENTICATED + "?key=" + regkey; if (institute != null) { ref += "&" + Const.ParamsNames.INSTRUCTOR_INSTITUTION + "=" + Sanitizer.sanitizeForUri(institute); } return ref; }
Source:
<code>private void writeRepeatedWithReuse(int COUNT, ValuesWriter cw, String prefix) throws UnsupportedEncodingException { <START> byte[] reused = (prefix + "0").getBytes("UTF-8"); <END> for (int i = 0; i < COUNT; i++) { Binary content = Binary.fromString(prefix + i % 10); System.arraycopy(content.getBytesUnsafe(), 0, reused, 0, reused.length); cw.writeBytes(Binary.fromReusedByteArray(reused)); } }</code><technical_language>This a Binary, a reused backed a byte array</technical_language>

Target:
private void writeRepeatedWithReuse(int COUNT, ValuesWriter cw, String prefix) throws UnsupportedEncodingException { Binary reused = Binary.fromReusedByteArray((prefix + "0").getBytes("UTF-8")); for (int i = 0; i < COUNT; i++) { Binary content = Binary.fromString(prefix + i % 10); System.arraycopy(content.getBytesUnsafe(), 0, reused.getBytesUnsafe(), 0, reused.length()); cw.writeBytes(reused); } }
Source:
<code>public void testClippingOfRecordWithSoftClipBasesAtTheEnd() { final SAMFileHeader header = new SAMFileHeader(); header.addSequence(new SAMSequenceRecord("1", 1000)); final SAMRecord record = new SAMRecord(header); record.setReadPairedFlag(true); record.setCigar(new Cigar(Arrays.asList(new CigarElement(5, CigarOperator.M), new CigarElement(5, CigarOperator.S)))); record.setReferenceIndex(0); record.setAlignmentStart(1); record.setMateAlignmentStart(5); record.setMateReferenceIndex(0); record.setReadBases("AAAAAAAAAA".getBytes()); final int numToClip = SAMUtils.getNumOverlappingBasesToClip(record); Assert.assertEquals(numToClip, 1); SAMUtils.clipOverlappingBases(record, numToClip, false); final Cigar cigar = record.getCigar(); Assert.assertEquals(cigar.numCigarElements(), 2); <START> Assert.assertEquals(cigar.getCigarElement(0).getLength(), 4); END> Assert.assertEquals(cigar.getCigarElement(0).getOperator(), CigarOperator.M); Assert.assertEquals(cigar.getCigarElement(1).getLength(), 6); Assert.assertEquals(cigar.getCigarElement(1).getOperator(), CigarOperator.S); }</code><technical_language>reason compare cigars directly? cigar-strings if work</technical_language>

Target:
public void testClippingOfRecordWithSoftClipBasesAtTheEnd() { final SAMFileHeader header = new SAMFileHeader(); header.addSequence(new SAMSequenceRecord("1", 1000)); final SAMRecord record = new SAMRecord(header); record.setReadPairedFlag(true); record.setCigar(TextCigarCodec.decode("5M5S")); record.setReferenceIndex(0); record.setAlignmentStart(1); record.setMateAlignmentStart(5); record.setMateReferenceIndex(0); record.setReadBases("AAAAAAAAAA".getBytes()); final int numToClip = SAMUtils.getNumOverlappingAlignedBasesToClip(record); Assert.assertEquals(numToClip, 1); SAMUtils.clipOverlappingAlignedBases(record, numToClip, false); Assert.assertTrue(record.getCigar().equals(TextCigarCodec.decode("4M6S"))); }
Source:
<code>private List<String> tryMergeDictionary() { final Set<String> mergedDictionary = new HashSet<>(); long totalDictionarySize = 0L; for (SpillingGrouper<KeyType> grouper : groupers) { final List<String> dictionary = grouper.getDictionary(); for (String key : dictionary) { <START> if (!mergedDictionary.contains(key)) { <END> totalDictionarySize += RowBasedGrouperHelper.estimateStringKeySize(key); if (totalDictionarySize > maxDictionarySizeForCombiner) { return null; } mergedDictionary.add(key); } } } return ImmutableList.copyOf(mergedDictionary); }</code><technical_language>if (mergedDictionary.add(key))</technical_language>

Target:
private List<String> tryMergeDictionary() { final Set<String> mergedDictionary = new HashSet<>(); long totalDictionarySize = 0L; for (SpillingGrouper<KeyType> grouper : groupers) { final List<String> dictionary = grouper.mergeAndGetDictionary(); for (String key : dictionary) { if (mergedDictionary.add(key)) { totalDictionarySize += RowBasedGrouperHelper.estimateStringKeySize(key); if (totalDictionarySize > maxDictionarySizeForCombiner) { return null; } } } } return ImmutableList.copyOf(mergedDictionary); }
Source:
<code>private void enableLoadBalancer() { if (Config.<Boolean>getValue(ConfigValues.EnableVdsLoadBalancing)) { log.info("Start scheduling to enable vds load balancer"); <START> executor.scheduleWithFixedDelay(() -> performLoadBalancing(), <END> Config.<Integer>getValue(ConfigValues.VdsLoadBalancingIntervalInMinutes), Config.<Integer>getValue(ConfigValues.VdsLoadBalancingIntervalInMinutes), TimeUnit.MINUTES); log.info("Finished scheduling to enable vds load balancer"); } }</code><technical_language>this::performLoadBalancing</technical_language>

Target:
private void enableLoadBalancer() { if (Config.<Boolean>getValue(ConfigValues.EnableVdsLoadBalancing)) { log.info("Start scheduling to enable vds load balancer"); executor.scheduleWithFixedDelay(this::performLoadBalancing, Config.<Integer>getValue(ConfigValues.VdsLoadBalancingIntervalInMinutes), Config.<Integer>getValue(ConfigValues.VdsLoadBalancingIntervalInMinutes), TimeUnit.MINUTES); log.info("Finished scheduling to enable vds load balancer"); } }
Source:
<code>void relink(Link link) { <START> if (this.link != link) { <END> reclaimSpace(LINK_CAPACITY); } this.link = link; }</code><technical_language>I this check before, intentional? If this.link = link; moved if block</technical_language>

Target:
void relink(Link link) { reclaimSpace(LINK_CAPACITY); this.link = link; }