anchor.diff:      buffer.write(file.getText(offset));
       return buffer.toString();
     }
  +
  +  /// Patches are ordered based on their selection.
  +  int compareTo(Patch other) => selection.compareTo(other.selection);
   }
  
positive.code: 
    /// Applies a series of non-overlapping patches to the text of a file.
    static String applyAll(SourceFile file, List<Patch> patches) {
      var sortedPatches = patches.toList()
        ..sort((a, b) => a.selection.compareTo(b.selection));
      var buffer = StringBuffer();
      int offset = 0;
      Patch lastPatch;
  
negative.code: // license that can be found in the LICENSE file or at
  // https://opensource.org/licenses/MIT.
  
  import 'package:collection/collection.dart';
  import 'package:source_span/source_span.dart';
  
  class Patch implements Comparable<Patch> {
    /// Selection to be replaced
    final FileSpan selection;
  
  