auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public static Map<String, String> buildUserMetadata(byte[] userMetadata) throws RestServiceException { Map<String, String> toReturn = null; if (userMetadata.length > 0) { try { ByteBuffer userMetadataBuffer = ByteBuffer.wrap(userMetadata); short version = userMetadataBuffer.getShort(); switch (version) { case UserMetadata_Version_V1: int sizeToRead = userMetadataBuffer.getInt(); if (sizeToRead != (userMetadataBuffer.remaining() - 8)) { logger.trace("Size didn't match. Returning as old format"); } else { int entryCount = userMetadataBuffer.getInt(); int counter = 0; while (counter++ < entryCount) { String key = Utils.deserializeString(userMetadataBuffer, StandardCharsets.US_ASCII); String value = Utils.deserializeString(userMetadataBuffer, StandardCharsets.US_ASCII); if (toReturn == null) { <START> toReturn = new HashMap<>(); <END> } toReturn.put(Headers.USER_META_DATA_HEADER_PREFIX + key, value); } long actualCRC = userMetadataBuffer.getLong(); Crc32 crc32 = new Crc32(); crc32.update(userMetadata, 0, userMetadata.length - Crc_Size); long expectedCRC = crc32.getValue(); if (actualCRC != expectedCRC) { logger.trace("corrupt data while parsing user metadata Expected CRC " + expectedCRC + " Actual CRC " + actualCRC); toReturn = null; } } break; default: logger.trace("Failed to parse version in new format. Returning as old format"); } } catch (RuntimeException e) { logger.trace("Runtime Exception on parsing user metadata. Returning as old format"); toReturn = null; } } return toReturn; }</code><technical_language>I this done while loop long entryCount > 0. More readable I feel</technical_language>

Target:
public static Map<String, String> buildUserMetadata(byte[] userMetadata) throws RestServiceException { Map<String, String> toReturn = null; if (userMetadata.length > 0) { try { ByteBuffer userMetadataBuffer = ByteBuffer.wrap(userMetadata); short version = userMetadataBuffer.getShort(); switch (version) { case UserMetadata_Version_V1: int sizeToRead = userMetadataBuffer.getInt(); if (sizeToRead != (userMetadataBuffer.remaining() - 8)) { logger.trace("Size didn't match. Returning null"); } else { int entryCount = userMetadataBuffer.getInt(); int counter = 0; if (entryCount > 0) { toReturn = new HashMap<>(); } while (counter++ < entryCount) { String key = Utils.deserializeString(userMetadataBuffer, StandardCharsets.US_ASCII); String value = Utils.deserializeString(userMetadataBuffer, StandardCharsets.US_ASCII); toReturn.put(Headers.USER_META_DATA_HEADER_PREFIX + key, value); } long actualCRC = userMetadataBuffer.getLong(); Crc32 crc32 = new Crc32(); crc32.update(userMetadata, 0, userMetadata.length - Crc_Size); long expectedCRC = crc32.getValue(); if (actualCRC != expectedCRC) { logger.trace("corrupt data while parsing user metadata Expected CRC " + expectedCRC + " Actual CRC " + actualCRC); toReturn = null; } } break; default: logger.trace("Failed to parse version in new format. Returning null"); } } catch (RuntimeException e) { logger.trace("Runtime Exception on parsing user metadata. Returning null"); toReturn = null; } } return toReturn; }
Source:
<code>public Future<GetBlobResult> getBlob(String blobId, GetBlobOptions options, Callback<GetBlobResult> callback) { <START> options = options == null ? GetBlobOptions.DEFAULT_OPTIONS : options; <END> currentOperationsCount.incrementAndGet(); if (options.getOperationType() == GetBlobOptions.OperationType.BlobInfo) { routerMetrics.getBlobInfoOperationRate.mark(); } else { routerMetrics.getBlobOperationRate.mark(); } if (options.getRange() != null) { routerMetrics.getBlobWithRangeOperationRate.mark(); } routerMetrics.operationQueuingRate.mark(); FutureResult<GetBlobResult> futureResult = new FutureResult<>(); if (isOpen.get()) { getOperationController().getBlob(blobId, options, futureResult, callback); } else { RouterException routerException = new RouterException("Cannot accept operation because Router is closed", RouterErrorCode.RouterClosed); routerMetrics.operationDequeuingRate.mark(); routerMetrics.onGetBlobError(routerException, options); operationCompleteCallback.completeOperation(futureResult, callback, null, routerException); } return futureResult; }</code><technical_language>I prefer passing a valid GetBlobOptions mandatory. caller type of operation wants getBlob() call. range (which is a bit fancy), feel right for router assume type</technical_language>

Target:
public Future<GetBlobResult> getBlob(String blobId, GetBlobOptions options, Callback<GetBlobResult> callback) { if (blobId == null || options == null) { throw new IllegalArgumentException("blobId or options must not be null"); } currentOperationsCount.incrementAndGet(); if (options.getOperationType() == GetBlobOptions.OperationType.BlobInfo) { routerMetrics.getBlobInfoOperationRate.mark(); } else { routerMetrics.getBlobOperationRate.mark(); } if (options.getRange() != null) { routerMetrics.getBlobWithRangeOperationRate.mark(); } routerMetrics.operationQueuingRate.mark(); FutureResult<GetBlobResult> futureResult = new FutureResult<>(); if (isOpen.get()) { getOperationController().getBlob(blobId, options, futureResult, callback); } else { RouterException routerException = new RouterException("Cannot accept operation because Router is closed", RouterErrorCode.RouterClosed); routerMetrics.operationDequeuingRate.mark(); routerMetrics.onGetBlobError(routerException, options); operationCompleteCallback.completeOperation(futureResult, callback, null, routerException); } return futureResult; }
Source:
<code>private static String sliceHostname(String assignment) { String[] tokens = assignment.split("(\\p{javaSpaceChar}+|\t+)+"); if (tokens.length < 2) { <START> throw new RuntimeException("Could not find hostname"); <END> } return tokens[1]; }</code><technical_language>here, helps debug</technical_language>

Target:
private static String sliceHostname(String assignment) { String[] tokens = assignment.split("(\\p{javaSpaceChar}+|\t+)+"); if (tokens.length < 2) { throw new RuntimeException("Could not find hostname in " + assignment); } return tokens[1]; }
Source:
<code>private void configureLockFileActions(File sandboxDir) { Task runIdeTask = project.getTasks().findByPath("runIde"); if (runIdeTask == null) throwGradleException("Unable to find the task 'runIde' of the intellij plugin."); runIdeTask.doFirst( (Task t) -> { try { if (!sandboxDir.exists() && !sandboxDir.mkdirs()) { throwGradleException( "Unable to create the sandbox directory: " + sandboxDir.getAbsolutePath()); } File lockFile = getLockFile(sandboxDir); boolean createdNewFile = lockFile.createNewFile(); if (!createdNewFile) throwGradleException("Lock file " + lockFile.getAbsolutePath() + " already exists!"); } catch (IOException e) { throw new GradleException( "Unable to lock sandbox: " + sandboxDir.getAbsolutePath() + RACE_CONDITION_WARNING, e); } }); <START> <END> runIdeTask.doLast( (Task t) -> { File lockFile = getLockFile(sandboxDir); if (!lockFile.delete()) throwGradleException("Failed to delete lock file: " + lockFile.getAbsolutePath()); }); }</code><technical_language>Add exception optional parameter for throwGradleException(...) method for this case</technical_language>

Target:
private void configureLockFileActions(File sandboxDir) { Task runIdeTask = project.getTasks().findByPath("runIde"); if (runIdeTask == null) throwGradleException("Unable to find the task 'runIde' of the intellij plugin.", null); runIdeTask.doFirst( (Task t) -> { try { if (!sandboxDir.exists() && !sandboxDir.mkdirs()) { throwGradleException( "Unable to create the sandbox directory: " + sandboxDir.getAbsolutePath(), null); } File lockFile = getLockFile(sandboxDir); boolean createdNewFile = lockFile.createNewFile(); if (!createdNewFile) throwGradleException( "Lock file " + lockFile.getAbsolutePath() + " already exists!", null); } catch (IOException e) { throwGradleException("Unable to lock sandbox: " + sandboxDir.getAbsolutePath(), e); } }); runIdeTask.doLast( (Task t) -> { File lockFile = getLockFile(sandboxDir); if (!lockFile.delete()) throwGradleException("Failed to delete lock file: " + lockFile.getAbsolutePath(), null); }); }
Source:
<code>public void leaveToken(DetailAST token) { switch (token.getType()) { case TokenTypes.CLASS_DEF: if (!classNameStack.isEmpty()) { classNameStack.pop(); } break; case TokenTypes.METHOD_DEF: if (!methodDefStack.isEmpty()) { <START> methodDefStack.pop(); <END> } break; default: break; } }</code><technical_language>do need Stack for this? a simple String variable work? sense for classes classes able pop() parent class... But, find a new Method_DEF a Method_def</technical_language>

Target:
public void leaveToken(DetailAST token) { if (token.getType() == TokenTypes.CLASS_DEF && !classNameStack.isEmpty()) { classNameStack.pop(); } }
Source:
<code>protected void assertSameCommands(Command expected, Command actual) { Gson gson = new Gson(); Assert.assertEquals(gson.toJson(expected), gson.toJson(actual)); Assert.assertTrue(Arrays.equals( expected.getAliasActions().toArray(), actual.getAliasActions().toArray())); Assert.assertFalse( expected.getAliasActionResults() != null ^ <START> actual.getAliasActionResults() != null ); <END> if (expected.getAliasActionResults() != null && actual.getAliasActionResults() != null) { Assert.assertTrue(Arrays.equals( expected.getAliasActionResults().toArray(), actual.getAliasActionResults().toArray())); } }</code><technical_language>This assertion is bit difficult for me. following? java Assert.assertTrue( expected.getAliasActionResults() != null && actual.getAliasActionResults() != null || expected.getAliasActionResults() == null && actual.getAliasActionResults() == null) code is smart. code is dull I is more clear want do</technical_language>

Target:
protected void assertSameCommands(Command expected, Command actual) { Gson gson = new Gson(); Assert.assertEquals(gson.toJson(expected), gson.toJson(actual)); Assert.assertTrue(Arrays.equals( expected.getAliasActions().toArray(), actual.getAliasActions().toArray())); Assert.assertTrue( expected.getAliasActionResults() != null && actual.getAliasActionResults() != null || expected.getAliasActionResults() == null && actual.getAliasActionResults() == null); if (expected.getAliasActionResults() != null && actual.getAliasActionResults() != null) { Assert.assertTrue(Arrays.equals( expected.getAliasActionResults().toArray(), actual.getAliasActionResults().toArray())); } }
Source:
<code>private List<String> gatherUnsupportedTests(TypeElement connector, Class<?> test) { return Arrays.stream(test.getMethods()) .filter(method -> method.getAnnotation(ConnectorTest.class) != null) .filter(method -> !connectorSupportsTestMethod(connector, test, method)) <START> .map(method -> method.getName()) <END> .collect(toImmutableList()); }</code><technical_language>Method::getName</technical_language>

Target:
private List<String> gatherUnsupportedTests(TypeElement connector, Class<?> test) { return Arrays.stream(test.getMethods()) .filter(method -> method.getAnnotation(ConnectorTest.class) != null) .filter(method -> !connectorSupportsTestMethod(connector, test, method)) .map(Method::getName) .collect(toImmutableList()); }
Source:
<code>private Object[][] testMultipleLibraryUmiMetricsDataProvider() { <START> final double effectiveLength2_1 = -(2./3.)*Math.log(2./3.)/Math.log(4.) -(1./3.)*Math.log(1./3.)/Math.log(4.); <END> final double effectiveLength1_1_1 = -3*(1./3.)*Math.log(1./3.)/Math.log(4.); final double estimatedBaseQuality1_12 = QualityUtil.getPhredScoreFromErrorProbability(1./12.); return new Object[][] {{ Arrays.asList("A", "B", "A", "B", "A"), Arrays.asList("AAAA", "AAAA", "ATTA", "AAAA", "AAAT"), Arrays.asList("AAAA", "AAAA", "ATTA", "AAAA", "AAAA"), Arrays.asList(false, false, false, true, true), 1, Arrays.asList( new UmiMetrics("A", 4.0, 3, 2, 2, 2, 4, effectiveLength2_1, effectiveLength1_1_1, estimatedBaseQuality1_12, 0), new UmiMetrics("B", 4.0, 1, 1, 0, 2, 2, 0.0, 0.0, -1, 0) ) }}; }</code><technical_language>Please add spaces /, * operators, IDE's reformat do this automatically for you</technical_language>

Target:
private Object[][] testMultipleLibraryUmiMetricsDataProvider() { final double effectiveLength2_1 = -(2. / 3.) * Math.log(2. / 3.) / Math.log(4.) - (1. / 3.) * Math.log(1. / 3.) / Math.log(4.); final double effectiveLength1_1_1 = -3 * (1. / 3.) * Math.log(1. / 3.) / Math.log(4.); final double estimatedBaseQuality1_12 = QualityUtil.getPhredScoreFromErrorProbability(1. / 12.); final double estimatedBaseQuality1_9 = QualityUtil.getPhredScoreFromErrorProbability(1. / 9.); return new Object[][]{{ Arrays.asList("A", "B", "A", "B", "A"), Arrays.asList("AAAA", "AAAA", "ATTA", "AAAA", "AAAT"), Arrays.asList("AAAA", "AAAA", "ATTA", "AAAA", "AAAA"), Arrays.asList(false, false, false, true, true), 1, Arrays.asList( new UmiMetrics("A", 4.0, 3, 2, 2, 2, 4, effectiveLength2_1, effectiveLength1_1_1, estimatedBaseQuality1_12, 0), new UmiMetrics("B", 4.0, 1, 1, 0, 2, 2, 0.0, 0.0, -1, 0) ) }, { Arrays.asList("A", "B", "C", "C", "C"), Arrays.asList("AAA", "AAA", "TTA", "AAA", "AAT"), Arrays.asList("AAA", "AAA", "TTA", "AAA", "AAA"), Arrays.asList(false, false, false, false, true), 1, Arrays.asList( new UmiMetrics("A", 3.0, 1, 1, 0, 2, 2, 0.0, 0.0, -1, 0), new UmiMetrics("B", 3.0, 1, 1, 0, 2, 2, 0.0, 0.0, -1, 0), new UmiMetrics("C", 3.0, 3, 2, 2, 2, 4, effectiveLength2_1, effectiveLength1_1_1, estimatedBaseQuality1_9, 0)) }}; }
Source:
<code>protected boolean doIsDebuggerAttachSupported() { if (fBackend.getSessionType() == SessionType.CORE) { return false; } IMIRunControl runControl = getServicesTracker().getService(IMIRunControl.class); if (runControl != null && runControl.getRunMode() == MIRunMode.ALL_STOP) { return getNumConnected() == 0; } <START> if (fBackend.getSessionType() == SessionType.REMOTE && !fBackend.getIsAttachSession()) { <END> try { return getLaunchConfiguration().getAttribute( IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_REMOTE_MULTI, IGDBLaunchConfigurationConstants.DEBUGGER_REMOTE_MULTI_DEFAULT); } catch(CoreException e) { GdbPlugin.getDefault().getLog().log(e.getStatus()); return false; } } return true; }</code><technical_language>This need adapted based decision for handle --multi for launch type</technical_language>

Target:
protected boolean doIsDebuggerAttachSupported() { if (fBackend.getSessionType() == SessionType.CORE) { return false; } if (fBackend.getSessionType() == SessionType.REMOTE && !fBackend.getIsAttachSession()) { return false; } IMIRunControl runControl = getServicesTracker().getService(IMIRunControl.class); if (runControl != null && runControl.getRunMode() == MIRunMode.ALL_STOP) { return getNumConnected() == 0; } return true; }
Source:
<code>public <START> Sampling setSampling(Sampling <END> sampling) { Sampling prev = fSampling; fSampling = sampling; return prev; }</code><technical_language>this worth return previous? used</technical_language>

Target:
public void setSampling(Sampling sampling) { fSampling = sampling; }
Source:
<code>public boolean processParentCoverage(CodeCoverageMetrics parentCoverage, String baseCommit, String branchName) { boolean passCoverage = true; if (parentCoverage == null) { logger.info(UBERALLS_TAG, "unable to find coverage for parent commit"); return passCoverage; } Float lineCoveragePercent = currentCoverage.getLineCoveragePercent(); logger.info(UBERALLS_TAG, "line coverage: " + lineCoveragePercent); logger.info(UBERALLS_TAG, "found parent coverage as " + parentCoverage.getLineCoveragePercent()); float coverageDelta = lineCoveragePercent - parentCoverage.getLineCoveragePercent(); String coverageDeltaDisplay = String.format("%.3f", coverageDelta); String lineCoverageDisplay = String.format("%.3f", lineCoveragePercent); if (coverageDelta > 0) { <START> passCoverage = false; <END> comment.append("Coverage increased (+" + coverageDeltaDisplay + "%) to " + lineCoverageDisplay + "%"); } else if (coverageDelta < 0) { comment.append("Coverage decreased (" + coverageDeltaDisplay + "%) to " + lineCoverageDisplay + "%"); } else { comment.append("Coverage remained the same (" + lineCoverageDisplay + "%)"); } comment.append(" when pulling **" + branchName + "** into "); comment.append(baseCommit.substring(0, 7)); comment.append("."); return passCoverage; }</code><technical_language>fail here</technical_language>

Target:
public boolean processParentCoverage(CodeCoverageMetrics parentCoverage, String baseCommit, String branchName) { boolean passCoverage = true; if (parentCoverage == null) { logger.info(UBERALLS_TAG, "unable to find coverage for parent commit"); return passCoverage; } Float lineCoveragePercent = currentCoverage.getLineCoveragePercent(); logger.info(UBERALLS_TAG, "line coverage: " + lineCoveragePercent); logger.info(UBERALLS_TAG, "found parent coverage as " + parentCoverage.getLineCoveragePercent()); double coverageDelta = lineCoveragePercent - parentCoverage.getLineCoveragePercent(); String coverageDeltaDisplay = String.format("%.3f", coverageDelta); String lineCoverageDisplay = String.format("%.3f", lineCoveragePercent); if (coverageDelta > 0) { comment.append("Coverage increased (+" + coverageDeltaDisplay + "%) to " + lineCoverageDisplay + "%"); } else if (coverageDelta < 0) { comment.append("Coverage decreased (" + coverageDeltaDisplay + "%) to " + lineCoverageDisplay + "%"); } else { comment.append("Coverage remained the same (" + lineCoverageDisplay + "%)"); } if (coverageDelta < 0 && Math.abs(coverageDelta) > Math.abs(maximumCoverageDecreaseInPercent)) { passCoverage = false; } comment.append(" when pulling **" + branchName + "** into "); comment.append(baseCommit.substring(0, 7)); comment.append("."); return passCoverage; }
Source:
<code>public static double calculateROCAUC(PriorityQueue<Pair<Double, Double>> queue, long pos, long neg, double positiveClsLb) { double[] lb = new double[queue.size()]; double[] prediction = new double[queue.size()]; int cnt = 0; <START> while (!queue.isEmpty()) { <END> Pair<Double, Double> elem = queue.poll(); System.out.println(elem.getKey() + " " + elem.getValue()); lb[cnt] = elem.getValue(); prediction[cnt] = elem.getKey(); cnt++; } double[] rank = new double[lb.length]; for (int i = 0; i < prediction.length; i++) { if (i == prediction.length - 1 || prediction[i] != prediction[i + 1]) rank[i] = i + 1; else { int j = i + 1; for (; j < prediction.length && prediction[j] == prediction[i]; j++); double r = (i + 1 + j) / 2.0; for (int k = i; k < j; k++) rank[k] = r; i = j - 1; } } double auc = 0.0; for (int i = 0; i < lb.length; i++) { if (lb[i] == positiveClsLb) auc += rank[i]; } if (pos == 0L) return Double.NaN; else if (neg == 0L) return Double.NaN; auc = (auc - (pos * (pos + 1) / 2.0)) / (pos * neg); return auc; }</code><technical_language>do heap here? ArrayList sort clear do same, I right</technical_language>

Target:
public static double calculateROCAUC(PriorityQueue<Pair<Double, Double>> queue, long pos, long neg, double positiveClsLb) { double[] lb = new double[queue.size()]; double[] prediction = new double[queue.size()]; int cnt = 0; while (!queue.isEmpty()) { Pair<Double, Double> elem = queue.poll(); lb[cnt] = elem.getValue(); prediction[cnt] = elem.getKey(); cnt++; } double[] rank = new double[lb.length]; for (int i = 0; i < prediction.length; i++) { if (i == prediction.length - 1 || prediction[i] != prediction[i + 1]) rank[i] = i + 1; else { int j = i + 1; for (; j < prediction.length && prediction[j] == prediction[i]; j++); double r = (i + 1 + j) / 2.0; for (int k = i; k < j; k++) rank[k] = r; i = j - 1; } } double auc = 0.0; for (int i = 0; i < lb.length; i++) { if (lb[i] == positiveClsLb) auc += rank[i]; } if (pos == 0L) return Double.NaN; else if (neg == 0L) return Double.NaN; auc = (auc - (pos * (pos + 1) / 2.0)) / (pos * neg); return auc; }
Source:
<code>public long getMaxResultSize() { <START> return super.getMaxResultSize(); <END> }</code><technical_language>Do need implement methods</technical_language>

Target:
public long getMaxResultSize() { return this.delegateScan.getMaxResultSize(); }
Source:
<code>public static BloomKFilter deserialize(ByteBuffer in, int position) throws IOException { if (in == null) { throw new IOException("Input stream is null"); } try { ByteBuffer dataBuffer = in.duplicate().order(ByteOrder.BIG_ENDIAN); dataBuffer.position(position); int numHashFunc = dataBuffer.get(); int bitsetArrayLen = dataBuffer.getInt(); long[] data = new long[bitsetArrayLen]; for (int i = 0; i < bitsetArrayLen; i++) { data[i] = dataBuffer.getLong(); } return new BloomKFilter(data, numHashFunc); } catch (RuntimeException e) { <START> IOException io = new IOException("Unable to deserialize BloomKFilter"); <END> io.initCause(e); throw io; } }</code><technical_language>throw new IOException("Unable deserialize BloomKFilter", e);</technical_language>

Target:
public static BloomKFilter deserialize(ByteBuffer in, int position) throws IOException { if (in == null) { throw new IOException("Input stream is null"); } try { ByteBuffer dataBuffer = in.duplicate().order(ByteOrder.BIG_ENDIAN); dataBuffer.position(position); int numHashFunc = dataBuffer.get(); int bitsetArrayLen = dataBuffer.getInt(); long[] data = new long[bitsetArrayLen]; for (int i = 0; i < bitsetArrayLen; i++) { data[i] = dataBuffer.getLong(); } return new BloomKFilter(data, numHashFunc); } catch (RuntimeException e) { throw new IOException("Unable to deserialize BloomKFilter", e); } }
Source:
<code><START> protected OsRegistrationReadingJob() <END> { super("Retrieving Link Handlers registration status from Operating System"); }</code><technical_language>yes, right</technical_language>

Target:
private OsRegistrationReadingJob() { super("Retrieving Link Handlers registration status from Operating System"); }
Source:
<code>public void testNonStreamApplicationWordcount() throws Exception { StreamFactory.fromFolder("./src/test/resources/data") .flatMap(new Function.FlatMapFunction<String, String>() { @Override public Iterable<String> f(String input) { return Arrays.asList(input.split(" ")); } }) <START> .countByKey().print().runEmbedded(5000); <END> }</code><technical_language>a real test out of :-)</technical_language>

Target:
public void testNonStreamApplicationWordcount() throws Exception { TupleCollector<Map<Object, Integer>> collector = new TupleCollector<>(); collector.id = "testNonStreamApplicationWordcount"; final Map<Object, Integer> expected = new HashMap<>(); expected.put("error", 2); expected.put("word1", 4); expected.put("word2", 8); expected.put("word3", 4); expected.put("word4", 4); expected.put("word5", 4); expected.put("word7", 4); expected.put("word9", 6); Callable<Boolean> exitCondition = new Callable<Boolean>() { @Override public Boolean call() throws Exception { List<Map<Object, Integer>> data = (List<Map<Object, Integer>>)TupleCollector.results.get("testNonStreamApplicationWordcount"); return (data != null) && data.size() >= 1 && expected.equals(data.get(data.size() - 1)); } }; StreamFactory.fromFolder("./src/test/resources/data") .flatMap(new Function.FlatMapFunction<String, String>() { @Override public Iterable<String> f(String input) { return Arrays.asList(input.split(" ")); } }) .countByKey().addOperator(collector, collector.inputPort, collector.outputPort).print().runEmbedded(false, 30000, exitCondition); List<Map<Object, Integer>> data = (List<Map<Object, Integer>>)TupleCollector.results.get("testNonStreamApplicationWordcount"); Assert.assertNotNull(data); Assert.assertTrue(data.size() > 1); Assert.assertEquals(expected, data.get(data.size() - 1)); }
Source:
<code>Connections(List<Connection> connections, List<EObject> selectedObjects) { this.connections = connections; origin = selectedObjects.get(0); allObjects = new LinkedHashSet<>(); allObjects.addAll(selectedObjects); connections.forEach(c -> allObjects.addAll(c.getTargets())); object2Id = new LinkedHashMap<>(); int i = 0; for (EObject o : allObjects) { object2Id.put(o, "o" + i++); } id2Label = new LinkedHashMap<>(); allObjects.forEach(o -> { String id = object2Id.get(o); id2Label.put(id, getArtifactLabel(o)); }); id2Link = new LinkedHashMap<>(); allObjects.forEach(o -> { String id = object2Id.get(o); id2Link.put(id, <START> getArtifactLink(o)); <END> }); }</code><technical_language>of word link confused a I thinking trace links. change artifact location</technical_language>

Target:
Connections(List<Connection> connections, List<EObject> selectedObjects) { this.connections = connections; origin = selectedObjects.get(0); allObjects = new LinkedHashSet<>(); allObjects.addAll(selectedObjects); connections.forEach(c -> allObjects.addAll(c.getTargets())); object2Id = new LinkedHashMap<>(); int i = 0; for (EObject o : allObjects) { object2Id.put(o, "o" + i++); } id2Label = new LinkedHashMap<>(); allObjects.forEach(o -> { String id = object2Id.get(o); id2Label.put(id, getArtifactLabel(o)); }); id2Location = new LinkedHashMap<>(); allObjects.forEach(o -> { String id = object2Id.get(o); id2Location.put(id, getArtifactLocation(o)); }); }
Source:
<code>public static void main(String[] args) throws Exception { VoterConfig config = new VoterConfig(); config.parse(AsyncBenchmark.class.getName(), args); SSLContext sslContext; try { KeyStore ks = KeyStore.getInstance("JKS"); <START> ks.load(new FileInputStream("/Users/mteixeira/keystore.jks"), "myk5yst15r5".toCharArray()); <END> KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509"); kmf.init(ks, "myk5yst15r5".toCharArray()); sslContext = SSLContext.getInstance("TLS"); sslContext.init(createKeyManagers("/Users/mteixeira/keystore.jks", "myk5yst15r5", "myk5yst15r5"), createTrustManagers("/Users/mteixeira/keystore.jks", "myk5yst15r5"), new SecureRandom()); } catch (Exception e) { return; } AsyncBenchmark benchmark = new AsyncBenchmark(config); benchmark.runBenchmark(); }</code><technical_language>remove hardcoded paths javax system properties</technical_language>

Target:
public static void main(String[] args) throws Exception { VoterConfig config = new VoterConfig(); config.parse(AsyncBenchmark.class.getName(), args); AsyncBenchmark benchmark = new AsyncBenchmark(config); benchmark.runBenchmark(); }
Source:
<code>public static NERDocument readFile(String path, String format, String documentName) throws Exception { NERDocument res = null; if (format.equals("-c")) { res = (new ColumnFileReader(path)).read(documentName); <START> } else { <END> if (format.equals("-r")) { res = BracketFileReader.read(path, documentName); } else { logger.info("Fatal error: unrecognized file format: " + format); System.exit(0); } } connectSentenceBoundaries(res.sentences); return res; }</code><technical_language>exiting, STDERR</technical_language>

Target:
public static NERDocument readFile(String path, String format, String documentName) throws Exception { NERDocument res = null; if (format.equals("-c")) { res = (new ColumnFileReader(path)).read(documentName); } else { if (format.equals("-r")) { res = BracketFileReader.read(path, documentName); } else { System.err.println("Fatal error: unrecognized file format: " + format); System.exit(0); } } connectSentenceBoundaries(res.sentences); return res; }
Source:
<code>Ref(DfsStreamKey key, long position, int size, T v) { this.key = key; this.position = position; this.size = size; this.value = v; <START> this.hot = true; <END> }</code><technical_language>This means clockHand hot initialization time. Intended</technical_language>

Target:
Ref(DfsStreamKey key, long position, int size, T v) { this.key = key; this.position = position; this.size = size; this.value = v; }
Source:
<code>private int parseRank(String card) { if (card.substring(0, 2).equals("10")) { return 10; } String s = "..23456789TJQKA"; <START> return s.indexOf(card.charAt(0)); <END> }</code><technical_language>indentation appears a bit here. Please try consistent rest of file Also, I lines line before: return "..23456789TJQKA".indexOf(card.charAt(0)); if extract string a variable, a useful descriptive name, e.g. possibleRanks</technical_language>

Target:
private int parseRank(String card) { if (card.substring(0, 2).equals("10")) { return 10; } return "..23456789TJQKA".indexOf(card.charAt(0)); }
Source:
<code>private void testDescriptionUpdate(String oldDescription, String newDescription, boolean changeExpected, String expectedMessage) { Task task = new TaskFluent() .setDescription(oldDescription) .setAdminUser("Administrator") .getTask(); taskService.addTask(task, new HashMap<String, Object>()); long taskId = task.getId(); List<I18NText> descriptions = new ArrayList<I18NText>(); descriptions.add(new I18NTextImpl("", newDescription)); taskService.setDescriptions(taskId, descriptions); task = taskService.getTaskById(taskId); Assertions.assertThat(task.getDescription()).isEqualTo(newDescription); List<AuditTask> auditTasks = taskAuditService.getAllAuditTasks(new QueryFilter()); Assertions.assertThat(auditTasks).hasSize(1); Assertions.assertThat(auditTasks.get(0).getDescription()).isEqualTo(newDescription); List<TaskEvent> taskEvents = taskAuditService.getAllTaskEvents(taskId, new QueryFilter()); if (changeExpected) { Assertions.assertThat(taskEvents).hasSize(2); assertEquals(expectedMessage, <START> taskEvents.get(1).getMessage()); <END> } else { Assertions.assertThat(taskEvents).hasSize(1); } }</code><technical_language>I mix jUnit Asserts AssertJ. mind changing AssertJ, please? Assertions.assertThat(taskEvents.get(1).getMessage()).isEqualTo(expectedMessage); in other places too, please. Thanks</technical_language>

Target:
private void testDescriptionUpdate(String oldDescription, String newDescription, boolean changeExpected, String expectedMessage) { Task task = new TaskFluent() .setDescription(oldDescription) .setAdminUser("Administrator") .getTask(); taskService.addTask(task, new HashMap<String, Object>()); long taskId = task.getId(); List<I18NText> descriptions = new ArrayList<I18NText>(); descriptions.add(new I18NTextImpl("", newDescription)); taskService.setDescriptions(taskId, descriptions); task = taskService.getTaskById(taskId); Assertions.assertThat(task.getDescription()).isEqualTo(newDescription); List<AuditTask> auditTasks = taskAuditService.getAllAuditTasks(new QueryFilter()); Assertions.assertThat(auditTasks).hasSize(1); Assertions.assertThat(auditTasks.get(0).getDescription()).isEqualTo(newDescription); List<TaskEvent> taskEvents = taskAuditService.getAllTaskEvents(taskId, new QueryFilter()); if (changeExpected) { Assertions.assertThat(taskEvents).hasSize(2); Assertions.assertThat(taskEvents.get(1).getMessage()).isEqualTo(expectedMessage); } else { Assertions.assertThat(taskEvents).hasSize(1); } }
Source:
<code>public MethodResultCode execute(final DlmsConnection conn, final DlmsDevice device, final Void v) throws ProtocolAdapterException { LOGGER.info("ACTIVATING PASSIVE CALENDAR"); final MethodParameter method = new MethodParameter(CLASS_ID, OBIS_CODE, METHOD_ID_ACTIVATE_PASSIVE_CALENDAR); MethodResult methodResultCode = null; try { methodResultCode = conn.action(method); } catch (final IOException e) { throw new ConnectionException(e); } <START> if (!MethodResultCode.SUCCESS.equals(methodResultCode)) { <END> throw new ProtocolAdapterException("Activating the activity calendar failed. MethodResult is: " + methodResultCode.getResultCode() + " ClassId: " + CLASS_ID + " obisCode: " + OBIS_CODE + " method id: " + METHOD_ID_ACTIVATE_PASSIVE_CALENDAR); } return MethodResultCode.SUCCESS; }</code><technical_language>this be: !MethodResultCode.SUCCESS.equals(methodResultCode.getResultCode()) methodResultCode named methodResult</technical_language>

Target:
public MethodResultCode execute(final DlmsConnection conn, final DlmsDevice device, final Void v) throws ProtocolAdapterException { LOGGER.info("ACTIVATING PASSIVE CALENDAR"); final MethodParameter method = new MethodParameter(CLASS_ID, OBIS_CODE, METHOD_ID_ACTIVATE_PASSIVE_CALENDAR); MethodResult methodResultCode = null; try { methodResultCode = conn.action(method); } catch (final IOException e) { throw new ConnectionException(e); } if (!MethodResultCode.SUCCESS.equals(methodResultCode.getResultCode())) { throw new ProtocolAdapterException("Activating the activity calendar failed. MethodResult is: " + methodResultCode.getResultCode() + " ClassId: " + CLASS_ID + " obisCode: " + OBIS_CODE + " method id: " + METHOD_ID_ACTIVATE_PASSIVE_CALENDAR); } return MethodResultCode.SUCCESS; }
Source:
<code><START> private LocalDateTimeSqlType() { super(SqlType.DATE, new Class<?>[] { LocalDateTime.class }); } <END></code><technical_language>matter default, this LOCAL_DATE_TIME consistent</technical_language>

Target:
private static final LocalDateTimeSqlType singleton = isJavaTimeSupported() ? new LocalDateTimeSqlType() : null; public static LocalDateTimeSqlType getSingleton() { return singleton; }
Source:
<code>private static Integer stratifySoftClippedBases(final SAMRecord sam) { final Cigar cigar = sam.getCigar(); if (cigar == null) { return -1; } return cigar.getCigarElements().stream() <START> .filter(e->e.getOperator()== CigarOperator.S) <END> .mapToInt(CigarElement::getLength).sum(); }</code><technical_language>spaces operators -> ==</technical_language>

Target:
private static Integer stratifySoftClippedBases(final SAMRecord sam) { final Cigar cigar = sam.getCigar(); if (cigar == null) { return NOT_ALIGNED_ERROR; } return cigar.getCigarElements().stream() .filter(e -> e.getOperator() == CigarOperator.S) .mapToInt(CigarElement::getLength).sum(); }
Source:
<code>public void checkIfCommentContainsPattern(XmlFile file) { XPath xpath = XPathFactory.newInstance().newXPath(); String expression = " try { <START> XPathExpression xPathExpression = xpath.compile(expression); <END> NodeList nodes = (NodeList) xPathExpression.evaluate(file.getNamespaceUnawareDocument(), XPathConstants.NODESET); for (int i = 0; i < nodes.getLength(); i++) { Node node = nodes.item(i); if (null != node) { String comment = node.getNodeValue().toLowerCase(Locale.ENGLISH); if (comment.contains(pattern) && !isLetterAround(comment, pattern)) { check.reportIssue(node, message); } } } } catch (XPathExpressionException e) { throw new IllegalStateException("Failed to run XPath expression", e); } }</code><technical_language>I inline expression here</technical_language>

Target:
public void checkIfCommentContainsPattern(XmlFile file) { try { NodeList nodes = (NodeList) xPathExpression.evaluate(file.getNamespaceUnawareDocument(), XPathConstants.NODESET); for (int i = 0; i < nodes.getLength(); i++) { Node node = nodes.item(i); String comment = node.getNodeValue().toLowerCase(Locale.ENGLISH); if (comment.contains(pattern) && !isLetterAround(comment, pattern)) { check.reportIssue(node, message); } } } catch (XPathExpressionException e) { throw new IllegalStateException("Failed to run XPath expression", e); } }
Source:
<code>protected Void visitShowFunctions(ShowFunctions node, Integer context) { builder.append("SHOW FUNCTIONS"); <START> node.getLikePattern().ifPresent((value) -> <END> builder.append(" LIKE ") .append(formatStringLiteral(value))); node.getEscape().ifPresent((value) -> builder.append(" ESCAPE ") .append(formatStringLiteral(value))); return null; }</code><technical_language>nit: () is unnecessary</technical_language>

Target:
protected Void visitShowFunctions(ShowFunctions node, Integer context) { builder.append("SHOW FUNCTIONS"); node.getLikePattern().ifPresent(value -> builder.append(" LIKE ") .append(formatStringLiteral(value))); node.getEscape().ifPresent(value -> builder.append(" ESCAPE ") .append(formatStringLiteral(value))); return null; }
Source:
<code>public void onModuleLoad() { <START> if (canLoadInIFrame(GWT.getModuleBaseURL() + GWT.getModuleName())) { <END> UserAgent.assertNotInIFrame(); } KeyUtil.setEncoderImpl(new KeyUtil.Encoder() { @Override public String encode(String e) { e = URL.encodeQueryString(e); e = fixPathImpl(e); e = fixColonImpl(e); e = fixDoubleQuote(e); return e; } @Override public String decode(final String e) { return URL.decodeQueryString(e); } private native String fixPathImpl(String path) ; private native String fixColonImpl(String path) ; private native String fixDoubleQuote(String path) ; }); initHostname(); Window.setTitle(M.windowTitle1(myHost)); final HostPageDataService hpd = GWT.create(HostPageDataService.class); hpd.load(new GerritCallback<HostPageData>() { @Override public void onSuccess(final HostPageData result) { Document.get().getElementById("gerrit_hostpagedata").removeFromParent(); myConfig = result.config; myTheme = result.theme; if (result.account != null) { myAccount = result.account; xGerritAuth = result.xGerritAuth; } if (result.accountDiffPref != null) { myAccountDiffPref = result.accountDiffPref; applyUserPreferences(); } onModuleLoad2(result); } }); }</code><technical_language>Missing negation</technical_language>

Target:
public void onModuleLoad() { if (!canLoadInIFrame(GWT.getModuleBaseURL() + GWT.getModuleName())) { UserAgent.assertNotInIFrame(); } KeyUtil.setEncoderImpl(new KeyUtil.Encoder() { @Override public String encode(String e) { e = URL.encodeQueryString(e); e = fixPathImpl(e); e = fixColonImpl(e); e = fixDoubleQuote(e); return e; } @Override public String decode(final String e) { return URL.decodeQueryString(e); } private native String fixPathImpl(String path) ; private native String fixColonImpl(String path) ; private native String fixDoubleQuote(String path) ; }); initHostname(); Window.setTitle(M.windowTitle1(myHost)); final HostPageDataService hpd = GWT.create(HostPageDataService.class); hpd.load(new GerritCallback<HostPageData>() { @Override public void onSuccess(final HostPageData result) { Document.get().getElementById("gerrit_hostpagedata").removeFromParent(); myConfig = result.config; myTheme = result.theme; if (result.account != null) { myAccount = result.account; xGerritAuth = result.xGerritAuth; } if (result.accountDiffPref != null) { myAccountDiffPref = result.accountDiffPref; applyUserPreferences(); } onModuleLoad2(result); } }); }
Source:
<code>public void clickOnDecrementMemoryButton(String machineName) { seleniumWebDriverHelper.waitAndClick(By.xpath(format(DECREMENT_MEMORY_BUTTON, machineName))); <START> WaitUtils.sleepQuietly(1); <END> }</code><technical_language>clicked button in command before, it</technical_language>

Target:
public void clickOnDecrementMemoryButton(String machineName) { seleniumWebDriverHelper.waitAndClick(By.xpath(format(DECREMENT_MEMORY_BUTTON, machineName))); }
Source:
<code>private void loadPlugins(HostPageData hpd, final String token) { if (hpd.plugins != null) { for (final String url : hpd.plugins) { ScriptInjector.fromUrl(url) .setWindow(ScriptInjector.TOP_WINDOW) .setCallback(new Callback<Void, Exception>() { @Override public void onSuccess(Void result) { } @Override public void onFailure(Exception reason) { ErrorDialog d = new ErrorDialog(reason); d.setTitle(M.pluginFailed(url)); d.center(); } }).inject(); } } CallbackHandle<Boolean> cb = new CallbackHandle<Boolean>( new ResultDeserializer<Boolean>() { @Override public Boolean fromResult(JavaScriptObject responseObject) { return true; } }, new AsyncCallback<Boolean>() { @Override public void onFailure(Throwable caught) { } @Override public void onSuccess(Boolean result) { display(token); } }); cb.install(); <START> ScriptInjector.fromString(cb.getFunctionName() + "(true);").inject(); <END> }</code><technical_language>a concerned this block. intent is delay switching requested screen plugins a chance download JavaScript initialize. This permits (one day) hook events fired main UI react initial page load. For a normal JS plugin this is fine. This script block is plugin's block, run plugin script executes. For a GWT plugin this is a problem. nocache.js loads <iframe> waits for content download executes rest of code's init deferred. transfer display screen happen GWT plugin finish initialization. rely onSuccess method in Callback onSuccess onFailure do work browsers. Safari notable exceptions get fired browser. is GWT docs me</technical_language>

Target:
private void loadPlugins(HostPageData hpd, final String token) { if (hpd.plugins != null) { for (final String url : hpd.plugins) { ScriptInjector.fromUrl(url) .setWindow(ScriptInjector.TOP_WINDOW) .setCallback(new Callback<Void, Exception>() { @Override public void onSuccess(Void result) { } @Override public void onFailure(Exception reason) { ErrorDialog d = new ErrorDialog(reason); d.setTitle(M.pluginFailed(url)); d.center(); } }).inject(); } } CallbackHandle<Boolean> cb = new CallbackHandle<Boolean>( new ResultDeserializer<Boolean>() { @Override public Boolean fromResult(JavaScriptObject responseObject) { return true; } }, new AsyncCallback<Boolean>() { @Override public void onFailure(Throwable caught) { } @Override public void onSuccess(Boolean result) { display(token); } }); cb.install(); ScriptInjector.fromString(cb.getFunctionName() + "(true);") .setWindow(ScriptInjector.TOP_WINDOW) .inject(); }
Source:
<code>private void printAnyOperator(Function function, SymbolPrinterContext context) { List<Symbol> args = function.arguments(); assert args.size() == 2 : "function's number of arguments must be 2"; context.builder.append(PAREN_OPEN); args.get(0).accept(this, context); boolean ignoreCase = LikeOperators.extractIgnoreCase(function); String functionName = function.info().ident().name(); <START> String operatorName = caseSensitiveOperatorName(anyOperatorName(functionName), ignoreCase); <END> context.builder .append(WS) .append(operatorName) .append(WS); context.builder.append(ANY).append(PAREN_OPEN); args.get(1).accept(this, context); context.builder.append(PAREN_CLOSE) .append(PAREN_CLOSE); }</code><technical_language>Is this required separate ilike operator functions</technical_language>

Target:
private void printAnyOperator(Function function, SymbolPrinterContext context) { List<Symbol> args = function.arguments(); assert args.size() == 2 : "function's number of arguments must be 2"; context.builder.append(PAREN_OPEN); args.get(0).accept(this, context); String operatorName = anyOperatorName(function.info().ident().name()); context.builder .append(WS) .append(operatorName) .append(WS); context.builder.append(ANY).append(PAREN_OPEN); args.get(1).accept(this, context); context.builder.append(PAREN_CLOSE) .append(PAREN_CLOSE); }
Source:
<code>public Object[] factory() { return new Object[]{ new ExpirationFunctionalTest().withStorage(StorageType.OBJECT), new ExpirationFunctionalTest().withStorage(StorageType.OFF_HEAP) <START> }; <END> }</code><technical_language>include BINARY in case :)</technical_language>

Target:
public Object[] factory() { return new Object[]{ new ExpirationFunctionalTest().withStorage(StorageType.BINARY), new ExpirationFunctionalTest().withStorage(StorageType.OBJECT), new ExpirationFunctionalTest().withStorage(StorageType.OFF_HEAP) }; }
Source:
<code>public static void storeUnhandledException(Throwable exception) { SharedPreferences.Editor prefsEditor = preferences.edit(); <START> if (isCrashReportEnabled) { <END> Gson gson = new Gson(); String check = preferences.getString(EXCEPTION_FOR_REPORT, ""); if (check.isEmpty()) { String json = gson.toJson(exception); prefsEditor.putString(EXCEPTION_FOR_REPORT, json); prefsEditor.commit(); } } preferences.edit().putBoolean(RECOVERED_FROM_CRASH, true).commit(); }</code><technical_language>I this isCrashReportEnabled && isAnonymousReportEnabled(), right</technical_language>

Target:
public static void storeUnhandledException(Throwable exception) { SharedPreferences.Editor prefsEditor = preferences.edit(); if (isReportingEnabled()) { Gson gson = new Gson(); String check = preferences.getString(EXCEPTION_FOR_REPORT, ""); if (check.isEmpty()) { String json = gson.toJson(exception); prefsEditor.putString(EXCEPTION_FOR_REPORT, json); prefsEditor.commit(); } } preferences.edit().putBoolean(RECOVERED_FROM_CRASH, true).commit(); }
Source:
<code>public static void setParameterStyle(Parameter parameter, io.swagger.oas.annotations.Parameter p) { <START> if (isExplodable(p)) { <END> if (StringUtils.isNotBlank(p.style())) { parameter.setStyle(Parameter.StyleEnum.valueOf(p.style())); } else { if (HEADER.equals(p.in()) || PATH.equals(p.in())) { parameter.setStyle(Parameter.StyleEnum.SIMPLE); } else if (QUERY.equals(p.in()) || COOKIE.equals(p.in())) { parameter.setStyle(Parameter.StyleEnum.FORM); } } } }</code><technical_language>Parameter style depend explodable not</technical_language>

Target:
public static void setParameterStyle(Parameter parameter, io.swagger.oas.annotations.Parameter p) { if (StringUtils.isNotBlank(p.style())) { parameter.setStyle(Parameter.StyleEnum.valueOf(p.style().toUpperCase())); } }
Source:
<code>public void saveOrUpdateShouldNotDeleteOldestPasswordWhenPasswordHistoryEqualToLimit() { List<PasswordHistoryEntity> passwordHistoryEntityList = getPasswordHistoryEntitylistWithElements(PASSWORD_HISTORY_LIMIT); given(this.userRepository.findOne(USER_ID)).willReturn(userEntityWithId); given(this.passwordHistoryRepository.save(passwordHistoryEntityWithUserEntity)).willReturn(passwordHistoryEntityWithUserEntity); given(this.passwordHistoryRepository.findByUserEntity(userEntityWithId)).willReturn(passwordHistoryEntityList); <START> given(this.passwordHistoryRepository.findOldestPassword(USER_ID)).willReturn(passwordHistoryEntityList.get(0)); <END> this.passwordChangeService.saveOrUpdate(passwordHistoryDtoWithUserId); then(this.passwordHistoryRepository).should(never()).delete(passwordHistoryEntityList.get(0)); }</code><technical_language>This unnecessary</technical_language>

Target:
public void saveOrUpdateShouldNotDeleteOldestPasswordWhenPasswordHistoryEqualToLimit() { List<PasswordHistoryEntity> passwordHistoryEntityList = getPasswordHistoryEntitylistWithElements(PASSWORD_HISTORY_LIMIT); given(this.userRepository.findOne(USER_ID)).willReturn(userEntityWithId); given(this.passwordHistoryRepository.save(passwordHistoryEntityWithUserEntity)).willReturn(passwordHistoryEntityWithUserEntity); given(this.passwordHistoryRepository.findByUserEntity(userEntityWithId)).willReturn(passwordHistoryEntityList); this.passwordChangeService.saveOrUpdate(passwordHistoryDtoWithUserId); then(this.passwordHistoryRepository).should(never()).delete(passwordHistoryEntityList.get(0)); then(this.userRepository).should().findOne(USER_ID); then(this.passwordHistoryRepository).should().save(passwordHistoryEntityWithUserEntity); then(this.passwordHistoryRepository).should().findByUserEntity(userEntityWithId); }
Source:
<code>private static String colorizeHitString(final Object hitsString) { <START> final String color = LookAndFeel.isCurrentLookAndFeelDark() ? "red" : "#8B0000"; <END> return "<font color='" + color + "'>" + hitsString + "</font>"; }</code><technical_language>minor, objections extracting "#8B0000" a named constant? EG: "DARKER_RED"</technical_language>

Target:
private static String colorizeHitString(final Object hitsString) { final String color = LookAndFeel.isCurrentLookAndFeelDark() ? "red" : DARKER_RED; return "<font color='" + color + "'>" + hitsString + "</font>"; }
Source:
<code><START> public int hashCode() { <END> return name.hashCode() ^ parameterTypes.hashCode(); }</code><technical_language>final,</technical_language>

Target:
public final int hashCode() { return name.hashCode() ^ parameterTypes.hashCode(); }
Source:
<code>public List<VariableReferenceExpression> getOriginalDistinctAggregateArgs() { return aggregations.values().stream() .filter(aggregation -> aggregation.getMask().isPresent()) .flatMap(aggregation -> aggregation.getArguments().stream()) .distinct() <START> .map(symbol -> getVariable(symbol, types).get()) <END> .collect(Collectors.toList()); }</code><technical_language>inline getVariable</technical_language>

Target:
public List<VariableReferenceExpression> getOriginalDistinctAggregateArgs() { return aggregations.values().stream() .filter(aggregation -> aggregation.getMask().isPresent()) .flatMap(aggregation -> aggregation.getArguments().stream()) .distinct() .map(symbol -> toVariableReference(Symbol.from(castToExpression(symbol)), types)) .collect(Collectors.toList()); }