Skip to content

Commit

Permalink
Improvement for whitespace changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tsantalis committed Nov 13, 2024
1 parent 3b0ceec commit 470e8d0
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 12 deletions.
3 changes: 3 additions & 0 deletions src/main/java/org/codetracker/BlockTrackerChangeHistory.java
Original file line number Diff line number Diff line change
Expand Up @@ -1389,6 +1389,9 @@ public void processChange(Block blockBefore, Block blockAfter) {
subListFound = true;
for (int j=0; j<affectedLines.size(); j++) {
int actualLine = startBlock.signatureStartLine() + index + j;
if(equalOrStripEqual(original, revised, affectedLines.get(j))) {
continue;
}
if (lineChangeMap.containsKey(pair)) {
lineChangeMap.get(pair).add(actualLine);
}
Expand Down
14 changes: 7 additions & 7 deletions src/test/resources/blame/blameTestWithLocalRepo17.txt
Original file line number Diff line number Diff line change
Expand Up @@ -514,12 +514,12 @@ dbecbe5df hadoop-mapreduce/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-res
514)
5aace38b7 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Arun Suresh 2016-07-26 21:54:03 +0000 515) for (SchedulerRequestKey schedulerKey :
5aace38b7 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Arun Suresh 2016-07-26 21:54:03 +0000 516) application.getSchedulerKeys()) {
5aace38b7 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Arun Suresh 2016-07-26 21:54:03 +0000 517) int maxContainers =
dbecbe5df hadoop-mapreduce/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Vinod Kumar Vavilapalli 2011-08-18 11:07:10 +0000 517) int maxContainers =
5aace38b7 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Arun Suresh 2016-07-26 21:54:03 +0000 518) getMaxAllocatableContainers(application, schedulerKey, node,
5aace38b7 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Arun Suresh 2016-07-26 21:54:03 +0000 519) NodeType.OFF_SWITCH);
dbecbe5df hadoop-mapreduce/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Vinod Kumar Vavilapalli 2011-08-18 11:07:10 +0000 519) NodeType.OFF_SWITCH);
dbecbe5df hadoop-mapreduce/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Vinod Kumar Vavilapalli 2011-08-18 11:07:10 +0000 520) // Ensure the application needs containers of this priority
dbecbe5df hadoop-mapreduce/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Vinod Kumar Vavilapalli 2011-08-18 11:07:10 +0000 521) if (maxContainers > 0) {
5aace38b7 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Arun Suresh 2016-07-26 21:54:03 +0000 522) int assignedContainers =
dbecbe5df hadoop-mapreduce/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Vinod Kumar Vavilapalli 2011-08-18 11:07:10 +0000 522) int assignedContainers =
5aace38b7 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Arun Suresh 2016-07-26 21:54:03 +0000 523) assignContainersOnNode(node, application, schedulerKey);
dbecbe5df hadoop-mapreduce/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Vinod Kumar Vavilapalli 2011-08-18 11:07:10 +0000 524) // Do not assign out of order w.r.t priorities
dbecbe5df hadoop-mapreduce/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Vinod Kumar Vavilapalli 2011-08-18 11:07:10 +0000 525) if (assignedContainers == 0) {
Expand Down Expand Up @@ -590,11 +590,11 @@ dbecbe5df hadoop-mapreduce/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-res
de3b4aac5 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Jian He 2016-11-07 18:14:39 +0000 590) FifoAppAttempt application, SchedulerRequestKey schedulerKey
dbecbe5df hadoop-mapreduce/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Vinod Kumar Vavilapalli 2011-08-18 11:07:10 +0000 591) ) {
dbecbe5df hadoop-mapreduce/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Vinod Kumar Vavilapalli 2011-08-18 11:07:10 +0000 592) // Data-local
5aace38b7 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Arun Suresh 2016-07-26 21:54:03 +0000 593) int nodeLocalContainers =
dbecbe5df hadoop-mapreduce/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Vinod Kumar Vavilapalli 2011-08-18 11:07:10 +0000 593) int nodeLocalContainers =
5aace38b7 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Arun Suresh 2016-07-26 21:54:03 +0000 594) assignNodeLocalContainers(node, application, schedulerKey);
595)
dbecbe5df hadoop-mapreduce/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Vinod Kumar Vavilapalli 2011-08-18 11:07:10 +0000 596) // Rack-local
5aace38b7 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Arun Suresh 2016-07-26 21:54:03 +0000 597) int rackLocalContainers =
dbecbe5df hadoop-mapreduce/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Vinod Kumar Vavilapalli 2011-08-18 11:07:10 +0000 597) int rackLocalContainers =
5aace38b7 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Arun Suresh 2016-07-26 21:54:03 +0000 598) assignRackLocalContainers(node, application, schedulerKey);
599)
dbecbe5df hadoop-mapreduce/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Vinod Kumar Vavilapalli 2011-08-18 11:07:10 +0000 600) // Off-switch
Expand Down Expand Up @@ -647,7 +647,7 @@ dbecbe5df hadoop-mapreduce/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-res
5183e8810 hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Arun Murthy 2011-09-14 22:46:57 +0000 647) return 0;
5183e8810 hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Arun Murthy 2011-09-14 22:46:57 +0000 648) }
649)
2977bc6a1 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Arun Suresh 2017-01-06 17:59:57 +0000 650) int assignableContainers =
dbecbe5df hadoop-mapreduce/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Vinod Kumar Vavilapalli 2011-08-18 11:07:10 +0000 650) int assignableContainers =
2977bc6a1 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Arun Suresh 2017-01-06 17:59:57 +0000 651) Math.min(getMaxAllocatableContainers(application, schedulerKey, node,
2977bc6a1 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Arun Suresh 2017-01-06 17:59:57 +0000 652) NodeType.RACK_LOCAL), rackAsk.getCount());
dbecbe5df hadoop-mapreduce/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Vinod Kumar Vavilapalli 2011-08-18 11:07:10 +0000 653) assignedContainers =
Expand Down Expand Up @@ -969,7 +969,7 @@ e1d3670f4 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-
0cd145a44 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Robert Kanter 2018-06-04 22:32:03 +0000 969) // A decommissioned node might be removed before we get here
0cd145a44 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Robert Kanter 2018-06-04 22:32:03 +0000 970) if (node != null &&
0cd145a44 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Robert Kanter 2018-06-04 22:32:03 +0000 971) Resources.greaterThanOrEqual(resourceCalculator, getClusterResource(),
0cd145a44 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Robert Kanter 2018-06-04 22:32:03 +0000 972) node.getUnallocatedResource(), minimumAllocation)) {
f9692770a hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Karthik Kambatla 2016-02-28 17:35:59 +0000 972) node.getUnallocatedResource(), minimumAllocation)) {
754cb4e30 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Karthik Kambatla 2016-10-21 04:17:48 +0000 973) LOG.debug("Node heartbeat " + nm.getNodeID() +
f9692770a hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Karthik Kambatla 2016-02-28 17:35:59 +0000 974) " available resource = " + node.getUnallocatedResource());
975)
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/blame/blameTestWithLocalRepo4.txt
Original file line number Diff line number Diff line change
Expand Up @@ -555,8 +555,8 @@ f8d5e2fda javaparser-core/src/main/java/com/github/javaparser/printer/lexicalpre
555)
a25f53f88 javaparser-core/src/main/java/com/github/javaparser/printer/lexicalpreservation/Difference.java (Thomas Leu 2018-05-19 01:15:57 +0000 556) private boolean isFollowedByUnindent(List<DifferenceElement> diffElements, int diffIndex) {
7f177dcaa javaparser-core/src/main/java/com/github/javaparser/printer/lexicalpreservation/Difference.java (Thomas Leu 2018-05-18 21:48:21 +0000 557) return (diffIndex + 1) < diffElements.size()
7f177dcaa javaparser-core/src/main/java/com/github/javaparser/printer/lexicalpreservation/Difference.java (Thomas Leu 2018-05-18 21:48:21 +0000 558) && diffElements.get(diffIndex + 1).isAdded()
7f177dcaa javaparser-core/src/main/java/com/github/javaparser/printer/lexicalpreservation/Difference.java (Thomas Leu 2018-05-18 21:48:21 +0000 559) && diffElements.get(diffIndex + 1).getElement() instanceof CsmUnindent;
fb8daf167 javaparser-core/src/main/java/com/github/javaparser/printer/lexicalpreservation/Difference.java (Thomas Leu 2018-05-17 21:24:24 +0000 558) && diffElements.get(diffIndex + 1).isAdded()
fb8daf167 javaparser-core/src/main/java/com/github/javaparser/printer/lexicalpreservation/Difference.java (Thomas Leu 2018-05-17 21:24:24 +0000 559) && diffElements.get(diffIndex + 1).getElement() instanceof CsmUnindent;
7f177dcaa javaparser-core/src/main/java/com/github/javaparser/printer/lexicalpreservation/Difference.java (Thomas Leu 2018-05-18 21:48:21 +0000 560) }
561)
5123e075b javaparser-core/src/main/java/com/github/javaparser/printer/lexicalpreservation/Difference.java (Thomas Leu 2018-05-11 01:47:00 +0000 562) private List<Integer> findIndexOfCorrespondingNodeTextElement(List<CsmElement> elements, NodeText nodeText, int startIndex, Node node) {
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/blame/blameTestWithLocalRepo6.txt
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ b915e42c3 spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method
7dd8dc62a spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/AbstractMessageConverterMethodProcessor.java (Juergen Hoeller 2017-06-13 09:37:58 +0000 278) converter.canWrite(valueType, selectedMediaType)) {
28a5c3009 spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/AbstractMessageConverterMethodProcessor.java (Rossen Stoyanchev 2018-06-18 22:33:11 +0000 279) body = getAdvice().beforeBodyWrite(body, returnType, selectedMediaType,
7dd8dc62a spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/AbstractMessageConverterMethodProcessor.java (Juergen Hoeller 2017-06-13 09:37:58 +0000 280) (Class<? extends HttpMessageConverter<?>>) converter.getClass(),
7dd8dc62a spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/AbstractMessageConverterMethodProcessor.java (Juergen Hoeller 2017-06-13 09:37:58 +0000 281) inputMessage, outputMessage);
0556ed4f1 spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/AbstractMessageConverterMethodProcessor.java (Rossen Stoyanchev 2015-03-30 01:42:14 +0000 281) inputMessage, outputMessage);
28a5c3009 spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/AbstractMessageConverterMethodProcessor.java (Rossen Stoyanchev 2018-06-18 22:33:11 +0000 282) if (body != null) {
acc75aa4b org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/mvc/method/annotation/support/AbstractMessageConverterMethodProcessor.java (Rossen Stoyanchev 2011-04-06 11:30:59 +0000 283) if (logger.isDebugEnabled()) {
29ce6685c spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/AbstractMessageConverterMethodProcessor.java (Rossen Stoyanchev 2018-08-01 21:49:28 +0000 284) logger.debug("Writing [" + formatValue(body) + "]");
Expand Down
Loading

0 comments on commit 470e8d0

Please sign in to comment.