All files / output zcl_abapgit_diff.clas.mjs

2.35% Statements 16/679
66.66% Branches 2/3
6.25% Functions 1/16
2.35% Lines 16/679

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 6791x 1x                                             1x 1x 1x 1x               1x 1x               1x 1x 1x                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       1x 1x 1x 1x 1x
const {cx_root} = await import("./cx_root.clas.mjs");
// zcl_abapgit_diff.clas.abap
class zcl_abapgit_diff {
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'ZCL_ABAPGIT_DIFF';
  static IMPLEMENTED_INTERFACES = ["ZIF_ABAPGIT_DIFF"];
  static ATTRIBUTES = {"MT_BEACONS": {"type": () => {return abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_definitions=>ty_string_tt");}, "visibility": "I", "is_constant": " ", "is_class": " "},
  "MT_DIFF": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "patch_flag": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
  "new_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-new_num"}),
  "new": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-NEW"}),
  "result": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-result"}),
  "old_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-old_num"}),
  "old": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-OLD"}),
  "short": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
  "beacon": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-BEACON"})}, "zif_abapgit_definitions=>ty_diff", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"new_num","type":"SORTED","isUnique":false,"keyFields":["NEW_NUM"]},{"name":"old_num","type":"SORTED","isUnique":false,"keyFields":["OLD_NUM"]}]}, "zif_abapgit_definitions=>ty_diffs_tt");}, "visibility": "I", "is_constant": " ", "is_class": " "},
  "MS_STATS": {"type": () => {return new abap.types.Structure({
  "insert": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_COUNT-INSERT"}),
  "delete": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_COUNT-DELETE"}),
  "update": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_COUNT-UPDATE"})}, "zif_abapgit_definitions=>ty_count", undefined, {}, {});}, "visibility": "I", "is_constant": " ", "is_class": " "},
  "MV_COMPARE_MODE": {"type": () => {return new abap.types.Character(1, {});}, "visibility": "I", "is_constant": " ", "is_class": " "},
  "MV_IGNORE_CASE": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "visibility": "I", "is_constant": " ", "is_class": " "},
  "C_STARTING_BEACON": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "visibility": "I", "is_constant": "X", "is_class": "X"}};
  static METHODS = {"UNPACK": {"visibility": "I", "parameters": {"IV_NEW": {"type": () => {return new abap.types.XString({qualifiedName: "XSTRING"});}, "is_optional": " "}, "IV_OLD": {"type": () => {return new abap.types.XString({qualifiedName: "XSTRING"});}, "is_optional": " "}, "ET_NEW": {"type": () => {return abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "RSWSOURCET");}, "is_optional": " "}, "ET_OLD": {"type": () => {return abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "RSWSOURCET");}, "is_optional": " "}}},
  "MAP_BEACONS": {"visibility": "I", "parameters": {}},
  "SHORTLIST": {"visibility": "I", "parameters": {}},
  "CREATE_REGEX_SET": {"visibility": "I", "parameters": {"RT_REGEX_SET": {"type": () => {return abap.types.TableFactory.construct(new abap.types.ABAPObject({qualifiedName: "CL_ABAP_REGEX", RTTIName: "\\CLASS=CL_ABAP_REGEX"}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":["TABLE_LINE"]},"secondary":[]}, "zcl_abapgit_diff=>ty_regexset_tt");}, "is_optional": " "}}},
  "COMPUTE_DIFF": {"visibility": "I", "parameters": {"RT_DIFF": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "patch_flag": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
  "new_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-new_num"}),
  "new": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-NEW"}),
  "result": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-result"}),
  "old_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-old_num"}),
  "old": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-OLD"}),
  "short": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
  "beacon": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-BEACON"})}, "zif_abapgit_definitions=>ty_diff", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"new_num","type":"SORTED","isUnique":false,"keyFields":["NEW_NUM"]},{"name":"old_num","type":"SORTED","isUnique":false,"keyFields":["OLD_NUM"]}]}, "zif_abapgit_definitions=>ty_diffs_tt");}, "is_optional": " "}, "IT_NEW": {"type": () => {return abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "RSWSOURCET");}, "is_optional": " "}, "IT_OLD": {"type": () => {return abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "RSWSOURCET");}, "is_optional": " "}}},
  "COMPUTE_DIFF_EXTRA": {"visibility": "I", "parameters": {"RT_DIFF": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "patch_flag": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
  "new_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-new_num"}),
  "new": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-NEW"}),
  "result": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-result"}),
  "old_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-old_num"}),
  "old": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-OLD"}),
  "short": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
  "beacon": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-BEACON"})}, "zif_abapgit_definitions=>ty_diff", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"new_num","type":"SORTED","isUnique":false,"keyFields":["NEW_NUM"]},{"name":"old_num","type":"SORTED","isUnique":false,"keyFields":["OLD_NUM"]}]}, "zif_abapgit_definitions=>ty_diffs_tt");}, "is_optional": " "}, "IT_NEW": {"type": () => {return abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "RSWSOURCET");}, "is_optional": " "}, "IT_OLD": {"type": () => {return abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "RSWSOURCET");}, "is_optional": " "}}},
  "CALCULATE_STATS": {"visibility": "I", "parameters": {}},
  "ADJUST_DIFF": {"visibility": "I", "parameters": {}},
  "HAS_LINE_DIFF": {"visibility": "I", "parameters": {"RV_HAS_DIFF": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " "}, "IV_OLD": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "IV_NEW": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}}}};
  #mt_beacons;
  #mt_diff;
  #ms_stats;
  #mv_compare_mode;
  #mv_ignore_case;
  constructor() {
    this.me = new abap.types.ABAPObject();
    this.me.set(this);
    this.INTERNAL_ID = abap.internalIdCounter++;
    this.FRIENDS_ACCESS_INSTANCE = {
      "unpack": this.#unpack.bind(this),
      "map_beacons": this.#map_beacons.bind(this),
      "shortlist": this.#shortlist.bind(this),
      "create_regex_set": this.#create_regex_set.bind(this),
      "compute_diff": this.#compute_diff.bind(this),
      "compute_diff_extra": this.#compute_diff_extra.bind(this),
      "calculate_stats": this.#calculate_stats.bind(this),
      "adjust_diff": this.#adjust_diff.bind(this),
      "has_line_diff": this.#has_line_diff.bind(this),
    };
    this.#mt_beacons = abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_definitions=>ty_string_tt");
    this.FRIENDS_ACCESS_INSTANCE["mt_beacons"] = this.#mt_beacons;
    this.#mt_diff = abap.types.TableFactory.construct(new abap.types.Structure({
    "patch_flag": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "new_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-new_num"}),
    "new": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-NEW"}),
    "result": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-result"}),
    "old_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-old_num"}),
    "old": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-OLD"}),
    "short": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "beacon": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-BEACON"})}, "zif_abapgit_definitions=>ty_diff", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"new_num","type":"SORTED","isUnique":false,"keyFields":["NEW_NUM"]},{"name":"old_num","type":"SORTED","isUnique":false,"keyFields":["OLD_NUM"]}]}, "zif_abapgit_definitions=>ty_diffs_tt");
    this.FRIENDS_ACCESS_INSTANCE["mt_diff"] = this.#mt_diff;
    this.#ms_stats = new abap.types.Structure({
    "insert": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_COUNT-INSERT"}),
    "delete": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_COUNT-DELETE"}),
    "update": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_COUNT-UPDATE"})}, "zif_abapgit_definitions=>ty_count", undefined, {}, {});
    this.FRIENDS_ACCESS_INSTANCE["ms_stats"] = this.#ms_stats;
    this.#mv_compare_mode = new abap.types.Character(1, {});
    this.FRIENDS_ACCESS_INSTANCE["mv_compare_mode"] = this.#mv_compare_mode;
    this.#mv_ignore_case = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    this.FRIENDS_ACCESS_INSTANCE["mv_ignore_case"] = this.#mv_ignore_case;
    this.c_starting_beacon = zcl_abapgit_diff.c_starting_beacon;
  }
  async constructor_(INPUT) {
    if (super.constructor_) { await super.constructor_(INPUT); }
    return this;
  }
  async #adjust_diff() {
    let lv_block_begin = new abap.types.Integer({qualifiedName: "I"});
    let lv_block_end = new abap.types.Integer({qualifiedName: "I"});
    let ls_diff_block = new abap.types.Structure({
    "start": new abap.types.Integer({qualifiedName: "TY_DIFF_BLOCK-START"}),
    "len": new abap.types.Integer({qualifiedName: "TY_DIFF_BLOCK-LEN"})}, "ty_diff_block", undefined, {}, {});
    let lt_diff_block = abap.types.TableFactory.construct(new abap.types.Structure({
    "start": new abap.types.Integer({qualifiedName: "TY_DIFF_BLOCK-START"}),
    "len": new abap.types.Integer({qualifiedName: "TY_DIFF_BLOCK-LEN"})}, "ty_diff_block", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "");
    let fs_ls_diff_ = new abap.types.FieldSymbol(new abap.types.Structure({
    "patch_flag": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "new_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-new_num"}),
    "new": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-NEW"}),
    "result": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-result"}),
    "old_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-old_num"}),
    "old": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-OLD"}),
    "short": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "beacon": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-BEACON"})}, "zif_abapgit_definitions=>ty_diff", undefined, {}, {}));
    let fs_ls_diff_begin_ = new abap.types.FieldSymbol(new abap.types.Structure({
    "patch_flag": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "new_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-new_num"}),
    "new": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-NEW"}),
    "result": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-result"}),
    "old_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-old_num"}),
    "old": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-OLD"}),
    "short": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "beacon": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-BEACON"})}, "zif_abapgit_definitions=>ty_diff", undefined, {}, {}));
    let fs_ls_diff_end_ = new abap.types.FieldSymbol(new abap.types.Structure({
    "patch_flag": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "new_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-new_num"}),
    "new": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-NEW"}),
    "result": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-result"}),
    "old_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-old_num"}),
    "old": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-OLD"}),
    "short": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "beacon": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-BEACON"})}, "zif_abapgit_definitions=>ty_diff", undefined, {}, {}));
    for await (const unique75 of abap.statements.loop(this.#mt_diff)) {
      fs_ls_diff_.assign(unique75);
      if (abap.compare.eq(fs_ls_diff_.get().result, abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_diff.get().insert) || abap.compare.eq(fs_ls_diff_.get().result, abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_diff.get().delete)) {
        if (abap.compare.initial(ls_diff_block)) {
          ls_diff_block.get().start.set(abap.builtin.sy.get().tabix);
        }
        ls_diff_block.get().len.set(abap.operators.add(ls_diff_block.get().len,abap.IntegerFactory.get(1)));
      } else if (abap.compare.initial(ls_diff_block.get().start) === false) {
        abap.statements.append({source: ls_diff_block, target: lt_diff_block});
        ls_diff_block.clear();
      }
    }
    for await (const unique76 of abap.statements.loop(lt_diff_block)) {
      ls_diff_block.set(unique76);
      const indexBackup1 = abap.builtin.sy.get().index.get();
      const unique77 = ls_diff_block.get().len.get();
      for (let unique78 = 0; unique78 < unique77; unique78++) {
        abap.builtin.sy.get().index.set(unique78 + 1);
        lv_block_begin.set(abap.operators.minus(abap.operators.add(ls_diff_block.get().start,abap.builtin.sy.get().index),abap.IntegerFactory.get(1)));
        abap.statements.readTable(this.#mt_diff,{index: lv_block_begin,
          assigning: fs_ls_diff_begin_});
        if (abap.compare.ne(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) {
          break;
        }
        lv_block_end.set(abap.operators.minus(abap.operators.add(abap.operators.add(ls_diff_block.get().start,ls_diff_block.get().len),abap.builtin.sy.get().index),abap.IntegerFactory.get(1)));
        abap.statements.readTable(this.#mt_diff,{index: lv_block_end,
          assigning: fs_ls_diff_end_});
        if (abap.compare.ne(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) {
          break;
        }
        let unique79 = fs_ls_diff_begin_.get().result;
        if (abap.compare.eq(unique79, abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_diff.get().insert)) {
          if (abap.compare.eq(fs_ls_diff_begin_.get().new, fs_ls_diff_end_.get().new)) {
            fs_ls_diff_begin_.get().old_num.set(fs_ls_diff_end_.get().old_num);
            fs_ls_diff_begin_.get().old.set(fs_ls_diff_end_.get().old);
            fs_ls_diff_end_.get().result.set(fs_ls_diff_begin_.get().result);
            fs_ls_diff_begin_.get().result.clear();
            fs_ls_diff_end_.get().old_num.clear();
            fs_ls_diff_end_.get().old.clear();
          } else {
            break;
          }
        } else if (abap.compare.eq(unique79, abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_diff.get().delete)) {
          if (abap.compare.eq(fs_ls_diff_begin_.get().old, fs_ls_diff_end_.get().old)) {
            fs_ls_diff_begin_.get().new_num.set(fs_ls_diff_end_.get().new_num);
            fs_ls_diff_begin_.get().new.set(fs_ls_diff_end_.get().new);
            fs_ls_diff_end_.get().result.set(fs_ls_diff_begin_.get().result);
            fs_ls_diff_begin_.get().result.clear();
            fs_ls_diff_end_.get().new_num.clear();
            fs_ls_diff_end_.get().new.clear();
          } else {
            break;
          }
        } else {
          break;
        }
      }
      abap.builtin.sy.get().index.set(indexBackup1);
    }
  }
  async #calculate_stats() {
    let fs_ls_diff_ = new abap.types.FieldSymbol(new abap.types.Structure({
    "patch_flag": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "new_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-new_num"}),
    "new": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-NEW"}),
    "result": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-result"}),
    "old_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-old_num"}),
    "old": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-OLD"}),
    "short": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "beacon": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-BEACON"})}, "zif_abapgit_definitions=>ty_diff", undefined, {}, {}));
    for await (const unique80 of abap.statements.loop(this.#mt_diff)) {
      fs_ls_diff_.assign(unique80);
      let unique81 = fs_ls_diff_.get().result;
      if (abap.compare.eq(unique81, abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_diff.get().insert)) {
        this.#ms_stats.get().insert.set(abap.operators.add(this.#ms_stats.get().insert,abap.IntegerFactory.get(1)));
      } else if (abap.compare.eq(unique81, abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_diff.get().delete)) {
        this.#ms_stats.get().delete.set(abap.operators.add(this.#ms_stats.get().delete,abap.IntegerFactory.get(1)));
      } else if (abap.compare.eq(unique81, abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_diff.get().update)) {
        this.#ms_stats.get().update.set(abap.operators.add(this.#ms_stats.get().update,abap.IntegerFactory.get(1)));
      }
    }
  }
  async #compute_diff(INPUT) {
    let rt_diff = abap.types.TableFactory.construct(new abap.types.Structure({
    "patch_flag": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "new_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-new_num"}),
    "new": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-NEW"}),
    "result": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-result"}),
    "old_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-old_num"}),
    "old": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-OLD"}),
    "short": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "beacon": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-BEACON"})}, "zif_abapgit_definitions=>ty_diff", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"new_num","type":"SORTED","isUnique":false,"keyFields":["NEW_NUM"]},{"name":"old_num","type":"SORTED","isUnique":false,"keyFields":["OLD_NUM"]}]}, "zif_abapgit_definitions=>ty_diffs_tt");
    let it_new = INPUT?.it_new;
    if (it_new?.getQualifiedName === undefined || it_new.getQualifiedName() !== "RSWSOURCET") { it_new = undefined; }
    if (it_new === undefined) { it_new = abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "RSWSOURCET").set(INPUT.it_new); }
    let it_old = INPUT?.it_old;
    if (it_old?.getQualifiedName === undefined || it_old.getQualifiedName() !== "RSWSOURCET") { it_old = undefined; }
    if (it_old === undefined) { it_old = abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "RSWSOURCET").set(INPUT.it_old); }
    let lv_i = new abap.types.Integer({qualifiedName: "I"});
    let ls_diff = new abap.types.Structure({
    "patch_flag": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "new_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-new_num"}),
    "new": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-NEW"}),
    "result": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-result"}),
    "old_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-old_num"}),
    "old": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-OLD"}),
    "short": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "beacon": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-BEACON"})}, "zif_abapgit_definitions=>ty_diff", undefined, {}, {});
    let lt_delta = abap.types.TableFactory.construct((() => { throw new Error("Void type: RSEDCRESUL") })(), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "");
    let fs_ls_delta_ = new abap.types.FieldSymbol((() => { throw new Error("Void type: RSEDCRESUL") })());
    try {
      if (abap.FunctionModules['RS_CMP_COMPUTE_DELTA'] === undefined) { if (abap.Classes['CX_SY_DYN_CALL_ILLEGAL_FUNC'.trimEnd()] === undefined) { throw "CX_SY_DYN_CALL_ILLEGAL_FUNC not found"; } else { throw new abap.Classes['CX_SY_DYN_CALL_ILLEGAL_FUNC'.trimEnd()]();} }
      await abap.FunctionModules['RS_CMP_COMPUTE_DELTA']({exporting: {compare_mode: this.#mv_compare_mode, ignore_case_differences: this.#mv_ignore_case}, tables: {text_tab1: it_new, text_tab2: it_old, text_tab_res: lt_delta}});
      abap.builtin.sy.get().subrc.set(0);
    } catch (e) {
      if (e.classic) {
          switch (e.classic.toUpperCase()) {
          case "PARAMETER_INVALID": abap.builtin.sy.get().subrc.set(1); break;
          case "DIFFERENCE_NOT_FOUND": abap.builtin.sy.get().subrc.set(2); break;
          default: abap.builtin.sy.get().subrc.set(3); break;
            }
        } else {
            throw e;
        }
      }
      if (abap.compare.eq(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) {
        for await (const unique82 of abap.statements.loop(lt_delta)) {
          fs_ls_delta_.assign(unique82);
          ls_diff.clear();
          if (abap.compare.gt(fs_ls_delta_.get().line1, abap.IntegerFactory.get(0))) {
            lv_i.set(fs_ls_delta_.get().line1);
            ls_diff.get().old_num.set(lv_i);
            ls_diff.get().old.set(fs_ls_delta_.get().text1);
          }
          if (abap.compare.gt(fs_ls_delta_.get().line2, abap.IntegerFactory.get(0))) {
            lv_i.set(fs_ls_delta_.get().line2);
            ls_diff.get().new_num.set(lv_i);
            ls_diff.get().new.set(fs_ls_delta_.get().text2);
          }
          if (abap.compare.eq(fs_ls_delta_.get().flag1, abap.CharacterFactory.get(1, 'D'))) {
            ls_diff.get().result.set(abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_diff.get().delete);
          } else if (abap.compare.eq(fs_ls_delta_.get().flag2, abap.CharacterFactory.get(1, 'I'))) {
            ls_diff.get().result.set(abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_diff.get().insert);
          } else if (abap.compare.eq(fs_ls_delta_.get().flag1, abap.CharacterFactory.get(1, 'M')) && abap.compare.eq(fs_ls_delta_.get().flag2, abap.CharacterFactory.get(1, 'M'))) {
            ls_diff.get().result.set(abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_diff.get().update);
          } else if (abap.compare.eq(fs_ls_delta_.get().flag1, abap.CharacterFactory.get(1, '')) && abap.compare.eq(fs_ls_delta_.get().flag2, abap.CharacterFactory.get(1, ''))) {
            ls_diff.get().result.set(abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_diff.get().unchanged);
          } else if (abap.compare.eq(fs_ls_delta_.get().flag1, abap.CharacterFactory.get(1, '')) && abap.compare.eq(fs_ls_delta_.get().flag2, abap.CharacterFactory.get(1, 'E'))) {
            ls_diff.get().result.set(abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_diff.get().unchanged);
          } else if (abap.compare.eq(fs_ls_delta_.get().flag1, abap.CharacterFactory.get(1, 'E')) && abap.compare.eq(fs_ls_delta_.get().flag2, abap.CharacterFactory.get(1, ''))) {
            ls_diff.get().result.set(abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_diff.get().unchanged);
          } else {
            abap.statements.assert(abap.compare.eq(abap.IntegerFactory.get(0), abap.IntegerFactory.get(1)));
          }
          abap.statements.append({source: ls_diff, target: rt_diff});
        }
      } else if (abap.compare.eq(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(2))) {
        rt_diff.set((await this.#compute_diff_extra({it_new: it_new, it_old: it_old})));
      } else {
        abap.statements.assert(abap.compare.eq(abap.IntegerFactory.get(0), abap.IntegerFactory.get(1)));
      }
      return rt_diff;
    }
    async #compute_diff_extra(INPUT) {
      let rt_diff = abap.types.TableFactory.construct(new abap.types.Structure({
      "patch_flag": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
      "new_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-new_num"}),
      "new": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-NEW"}),
      "result": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-result"}),
      "old_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-old_num"}),
      "old": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-OLD"}),
      "short": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
      "beacon": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-BEACON"})}, "zif_abapgit_definitions=>ty_diff", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"new_num","type":"SORTED","isUnique":false,"keyFields":["NEW_NUM"]},{"name":"old_num","type":"SORTED","isUnique":false,"keyFields":["OLD_NUM"]}]}, "zif_abapgit_definitions=>ty_diffs_tt");
      let it_new = INPUT?.it_new;
      if (it_new?.getQualifiedName === undefined || it_new.getQualifiedName() !== "RSWSOURCET") { it_new = undefined; }
      if (it_new === undefined) { it_new = abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "RSWSOURCET").set(INPUT.it_new); }
      let it_old = INPUT?.it_old;
      if (it_old?.getQualifiedName === undefined || it_old.getQualifiedName() !== "RSWSOURCET") { it_old = undefined; }
      if (it_old === undefined) { it_old = abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "RSWSOURCET").set(INPUT.it_old); }
      let ls_diff = new abap.types.Structure({
      "patch_flag": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
      "new_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-new_num"}),
      "new": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-NEW"}),
      "result": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-result"}),
      "old_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-old_num"}),
      "old": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-OLD"}),
      "short": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
      "beacon": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-BEACON"})}, "zif_abapgit_definitions=>ty_diff", undefined, {}, {});
      let fs_lv_old_ = new abap.types.FieldSymbol(new abap.types.String({qualifiedName: "STRING"}));
      let fs_lv_new_ = new abap.types.FieldSymbol(new abap.types.String({qualifiedName: "STRING"}));
      for await (const unique83 of abap.statements.loop(it_old)) {
        fs_lv_old_.assign(unique83);
        ls_diff.clear();
        ls_diff.get().old_num.set(abap.builtin.sy.get().tabix);
        ls_diff.get().old.set(fs_lv_old_);
        abap.statements.readTable(it_new,{index: abap.builtin.sy.get().tabix,
          assigning: fs_lv_new_});
        if (abap.compare.ne(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) {
          break;
        }
        ls_diff.get().new_num.set(abap.builtin.sy.get().tabix);
        ls_diff.get().new.set(fs_lv_new_);
        if ((abap.compare.eq(this.#mv_compare_mode, abap.IntegerFactory.get(1)) || abap.compare.eq(this.#mv_compare_mode, abap.IntegerFactory.get(3))) && abap.compare.eq((await this.#has_line_diff({iv_old: fs_lv_old_, iv_new: fs_lv_new_})), abap.builtin.abap_true)) {
          ls_diff.get().result.set(abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_diff.get().update);
        }
        abap.statements.append({source: ls_diff, target: rt_diff});
      }
      return rt_diff;
    }
    async zif_abapgit_diff$create(INPUT) {
      let ri_diff = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_DIFF", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_DIFF"});
      let iv_new = INPUT?.iv_new;
      if (iv_new?.getQualifiedName === undefined || iv_new.getQualifiedName() !== "XSTRING") { iv_new = undefined; }
      if (iv_new === undefined) { iv_new = new abap.types.XString({qualifiedName: "XSTRING"}).set(INPUT.iv_new); }
      let iv_old = INPUT?.iv_old;
      if (iv_old?.getQualifiedName === undefined || iv_old.getQualifiedName() !== "XSTRING") { iv_old = undefined; }
      if (iv_old === undefined) { iv_old = new abap.types.XString({qualifiedName: "XSTRING"}).set(INPUT.iv_old); }
      let iv_ignore_indentation = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
      if (INPUT && INPUT.iv_ignore_indentation) {iv_ignore_indentation.set(INPUT.iv_ignore_indentation);}
      if (INPUT === undefined || INPUT.iv_ignore_indentation === undefined) {iv_ignore_indentation = abap.builtin.abap_false;}
      let iv_ignore_comments = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
      if (INPUT && INPUT.iv_ignore_comments) {iv_ignore_comments.set(INPUT.iv_ignore_comments);}
      if (INPUT === undefined || INPUT.iv_ignore_comments === undefined) {iv_ignore_comments = abap.builtin.abap_false;}
      let iv_ignore_case = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
      if (INPUT && INPUT.iv_ignore_case) {iv_ignore_case.set(INPUT.iv_ignore_case);}
      if (INPUT === undefined || INPUT.iv_ignore_case === undefined) {iv_ignore_case = abap.builtin.abap_false;}
      let lt_new = abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "RSWSOURCET");
      let lt_old = abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "RSWSOURCET");
      this.#mv_compare_mode.set(abap.IntegerFactory.get(1));
      if (abap.compare.eq(iv_ignore_indentation, abap.builtin.abap_true)) {
        this.#mv_compare_mode.set(abap.operators.add(this.#mv_compare_mode,abap.IntegerFactory.get(1)));
      }
      if (abap.compare.eq(iv_ignore_comments, abap.builtin.abap_true)) {
        this.#mv_compare_mode.set(abap.operators.add(this.#mv_compare_mode,abap.IntegerFactory.get(2)));
      }
      this.#mv_ignore_case.set(iv_ignore_case);
      await this.#unpack({iv_new: iv_new, iv_old: iv_old, et_new: lt_new, et_old: lt_old});
      this.#mt_diff.set((await this.#compute_diff({it_new: lt_new, it_old: lt_old})));
      await this.#adjust_diff();
      await this.#calculate_stats();
      await this.#map_beacons();
      await this.#shortlist();
      ri_diff.set(this.me);
      return ri_diff;
    }
    async #create_regex_set() {
      let rt_regex_set = abap.types.TableFactory.construct(new abap.types.ABAPObject({qualifiedName: "CL_ABAP_REGEX", RTTIName: "\\CLASS=CL_ABAP_REGEX"}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":["TABLE_LINE"]},"secondary":[]}, "zcl_abapgit_diff=>ty_regexset_tt");
      let lo_regex = new abap.types.ABAPObject({qualifiedName: "CL_ABAP_REGEX", RTTIName: "\\CLASS=CL_ABAP_REGEX"});
      let lt_regex = abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_definitions=>ty_string_tt");
      let lv_regex = new abap.types.String({qualifiedName: "STRING"});
      abap.statements.append({source: abap.CharacterFactory.get(62, '^\\s*(CLASS|FORM|MODULE|REPORT|METHOD|INTERFACE|FUNCTION)\\s[^=]'), target: lt_regex});
      abap.statements.append({source: abap.CharacterFactory.get(46, '^\\s*(PUBLIC|PROTECTED|PRIVATE)\\sSECTION(\\s|\\.)'), target: lt_regex});
      abap.statements.append({source: abap.CharacterFactory.get(42, '^\\s*(CLASS|INTERFACE|FUNCTION|TYPE)-POOL\\s'), target: lt_regex});
      abap.statements.append({source: abap.CharacterFactory.get(35, '^\\s*(START|END)-OF-SELECTION(\\s|\\.)'), target: lt_regex});
      abap.statements.append({source: abap.CharacterFactory.get(25, '^\\s*INITIALIZATION(\\s|\\.)'), target: lt_regex});
      abap.statements.append({source: abap.CharacterFactory.get(36, '^\\s*(TOP-OF-PAGE|END-OF-PAGE)(\\s|\\.)'), target: lt_regex});
      abap.statements.append({source: abap.CharacterFactory.get(68, '^\\s*AT\\s*(SELECTION-SCREEN|LINE-SELECTION|USER-COMMAND|PF\\d+)(\\s|\\.)'), target: lt_regex});
      abap.statements.append({source: abap.CharacterFactory.get(26, '^\\s*(DEFINE|ENHANCEMENT)\\s'), target: lt_regex});
      for await (const unique84 of abap.statements.loop(lt_regex)) {
        lv_regex.set(unique84);
        lo_regex.set(await (new abap.Classes['CL_ABAP_REGEX']()).constructor_({pattern: lv_regex, ignore_case: abap.builtin.abap_true}));
        abap.statements.append({source: lo_regex, target: rt_regex_set});
      }
      return rt_regex_set;
    }
    async zif_abapgit_diff$get() {
      let rt_diff = abap.types.TableFactory.construct(new abap.types.Structure({
      "patch_flag": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
      "new_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-new_num"}),
      "new": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-NEW"}),
      "result": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-result"}),
      "old_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-old_num"}),
      "old": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-OLD"}),
      "short": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
      "beacon": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-BEACON"})}, "zif_abapgit_definitions=>ty_diff", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"new_num","type":"SORTED","isUnique":false,"keyFields":["NEW_NUM"]},{"name":"old_num","type":"SORTED","isUnique":false,"keyFields":["OLD_NUM"]}]}, "zif_abapgit_definitions=>ty_diffs_tt");
      rt_diff.set(this.#mt_diff);
      return rt_diff;
    }
    async zif_abapgit_diff$get_beacons() {
      let rt_beacons = abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_definitions=>ty_string_tt");
      rt_beacons.set(this.#mt_beacons);
      return rt_beacons;
    }
    async zif_abapgit_diff$is_line_patched(INPUT) {
      let rv_patched = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
      let iv_index = INPUT?.iv_index;
      if (iv_index?.getQualifiedName === undefined || iv_index.getQualifiedName() !== "I") { iv_index = undefined; }
      if (iv_index === undefined) { iv_index = new abap.types.Integer({qualifiedName: "I"}).set(INPUT.iv_index); }
      let fs_ls_diff_ = new abap.types.FieldSymbol(new abap.types.Structure({
      "patch_flag": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
      "new_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-new_num"}),
      "new": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-NEW"}),
      "result": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-result"}),
      "old_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-old_num"}),
      "old": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-OLD"}),
      "short": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
      "beacon": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-BEACON"})}, "zif_abapgit_definitions=>ty_diff", undefined, {}, {}));
      abap.statements.readTable(this.#mt_diff,{index: iv_index,
        assigning: fs_ls_diff_});
      if (abap.compare.eq(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) {
        rv_patched.set(fs_ls_diff_.get().patch_flag);
      } else {
        await abap.Classes['ZCX_ABAPGIT_EXCEPTION'].raise({iv_text: new abap.types.String().set(`Diff line not found ${abap.templateFormatting(iv_index)}`)});
      }
      return rv_patched;
    }
    async #map_beacons() {
      let lv_beacon_idx = new abap.types.Integer({qualifiedName: "I"});
      lv_beacon_idx.set(zcl_abapgit_diff.c_starting_beacon);
      let lv_offs = new abap.types.Integer({qualifiedName: "I"});
      let lv_beacon_str = new abap.types.String({qualifiedName: "STRING"});
      let lv_beacon_2lev = new abap.types.String({qualifiedName: "STRING"});
      let lv_submatch = new abap.types.String({qualifiedName: "STRING"});
      let lo_regex = new abap.types.ABAPObject({qualifiedName: "CL_ABAP_REGEX", RTTIName: "\\CLASS=CL_ABAP_REGEX"});
      let lt_regex = abap.types.TableFactory.construct(new abap.types.ABAPObject({qualifiedName: "CL_ABAP_REGEX", RTTIName: "\\CLASS=CL_ABAP_REGEX"}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":["TABLE_LINE"]},"secondary":[]}, "zcl_abapgit_diff=>ty_regexset_tt");
      let fs_ls_diff_ = new abap.types.FieldSymbol(new abap.types.Structure({
      "patch_flag": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
      "new_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-new_num"}),
      "new": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-NEW"}),
      "result": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-result"}),
      "old_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-old_num"}),
      "old": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-OLD"}),
      "short": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
      "beacon": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-BEACON"})}, "zif_abapgit_definitions=>ty_diff", undefined, {}, {}));
      lt_regex.set((await this.#create_regex_set()));
      for await (const unique85 of abap.statements.loop(this.#mt_diff)) {
        fs_ls_diff_.assign(unique85);
        lv_offs.clear();
        fs_ls_diff_.get().beacon.set(lv_beacon_idx);
        for await (const unique86 of abap.statements.loop(lt_regex)) {
          lo_regex.set(unique86);
          abap.statements.find(fs_ls_diff_.get().new, {regex: lo_regex, first: true, submatches: [lv_submatch]});
          if (abap.compare.eq(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) {
            lv_beacon_str.set(fs_ls_diff_.get().new);
            lv_submatch.set(abap.builtin.to_upper({val: lv_submatch}));
            abap.statements.find(lv_beacon_str, {find: abap.CharacterFactory.get(1, '.'), first: true, offset: lv_offs});
            if (abap.compare.ne(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) {
              abap.statements.find(lv_beacon_str, {find: abap.CharacterFactory.get(1, '"'), first: true, offset: lv_offs});
            }
            if (abap.compare.gt(lv_offs, abap.IntegerFactory.get(0))) {
              lv_beacon_str.set(lv_beacon_str.getOffset({length: lv_offs}));
            }
            lv_beacon_str.set(abap.builtin.condense({val: lv_beacon_str, del: new abap.types.String().set(` `)}));
            if (abap.compare.eq(lv_submatch, abap.CharacterFactory.get(5, 'CLASS'))) {
              lv_beacon_2lev.set(abap.builtin.replace({val: lv_beacon_str, regex: abap.CharacterFactory.get(30, '\\s+(DEFINITION|IMPLEMENTATION)'), with: abap.CharacterFactory.get(1, ''), occ: abap.IntegerFactory.get(0)}));
            } else if (abap.compare.eq(lv_submatch, abap.CharacterFactory.get(6, 'METHOD'))) {
              lv_beacon_str.set(abap.operators.concat(lv_beacon_2lev,abap.operators.concat(new abap.types.String().set(` => `),lv_beacon_str)));
            } else if (abap.compare.eq(lv_submatch, abap.CharacterFactory.get(6, 'PUBLIC')) || abap.compare.eq(lv_submatch, abap.CharacterFactory.get(9, 'PROTECTED')) || abap.compare.eq(lv_submatch, abap.CharacterFactory.get(7, 'PRIVATE'))) {
              lv_beacon_str.set(abap.operators.concat(lv_beacon_2lev,abap.operators.concat(new abap.types.String().set(` `),lv_beacon_str)));
            }
            abap.statements.append({source: lv_beacon_str, target: this.#mt_beacons});
            lv_beacon_idx.set(abap.builtin.sy.get().tabix);
            fs_ls_diff_.get().beacon.set(lv_beacon_idx);
            break;
          }
        }
      }
    }
    async zif_abapgit_diff$set_patch_by_old_diff(INPUT) {
      let is_diff_old = INPUT?.is_diff_old;
      if (is_diff_old?.getQualifiedName === undefined || is_diff_old.getQualifiedName() !== "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF") { is_diff_old = undefined; }
      if (is_diff_old === undefined) { is_diff_old = new abap.types.Structure({
      "patch_flag": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
      "new_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-new_num"}),
      "new": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-NEW"}),
      "result": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-result"}),
      "old_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-old_num"}),
      "old": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-OLD"}),
      "short": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
      "beacon": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-BEACON"})}, "zif_abapgit_definitions=>ty_diff", undefined, {}, {}).set(INPUT.is_diff_old); }
      let iv_patch_flag = INPUT?.iv_patch_flag;
      if (iv_patch_flag?.getQualifiedName === undefined || iv_patch_flag.getQualifiedName() !== "ABAP_BOOL") { iv_patch_flag = undefined; }
      if (iv_patch_flag === undefined) { iv_patch_flag = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}).set(INPUT.iv_patch_flag); }
      let fs_ls_diff_ = new abap.types.FieldSymbol(new abap.types.Structure({
      "patch_flag": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
      "new_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-new_num"}),
      "new": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-NEW"}),
      "result": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-result"}),
      "old_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-old_num"}),
      "old": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-OLD"}),
      "short": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
      "beacon": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-BEACON"})}, "zif_abapgit_definitions=>ty_diff", undefined, {}, {}));
      for await (const unique87 of abap.statements.loop(this.#mt_diff,{usingKey: "new_num",where: async (I) => {return abap.compare.eq(I.old, is_diff_old.get().old) && abap.compare.eq(I.new, is_diff_old.get().new) && abap.compare.eq(I.new_num, is_diff_old.get().new_num) && abap.compare.eq(I.old_num, is_diff_old.get().old_num);},topEquals: {"old": is_diff_old.get().old,"new": is_diff_old.get().new,"new_num": is_diff_old.get().new_num,"old_num": is_diff_old.get().old_num}})) {
        fs_ls_diff_.assign(unique87);
        fs_ls_diff_.get().patch_flag.set(iv_patch_flag);
        break;
      }
    }
    async zif_abapgit_diff$set_patch_new(INPUT) {
      let iv_line_new = INPUT?.iv_line_new;
      if (iv_line_new?.getQualifiedName === undefined || iv_line_new.getQualifiedName() !== "I") { iv_line_new = undefined; }
      if (iv_line_new === undefined) { iv_line_new = new abap.types.Integer({qualifiedName: "I"}).set(INPUT.iv_line_new); }
      let iv_patch_flag = INPUT?.iv_patch_flag;
      if (iv_patch_flag?.getQualifiedName === undefined || iv_patch_flag.getQualifiedName() !== "ABAP_BOOL") { iv_patch_flag = undefined; }
      if (iv_patch_flag === undefined) { iv_patch_flag = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}).set(INPUT.iv_patch_flag); }
      let fs_ls_diff_ = new abap.types.FieldSymbol(new abap.types.Structure({
      "patch_flag": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
      "new_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-new_num"}),
      "new": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-NEW"}),
      "result": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-result"}),
      "old_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-old_num"}),
      "old": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-OLD"}),
      "short": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
      "beacon": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-BEACON"})}, "zif_abapgit_definitions=>ty_diff", undefined, {}, {}));
      abap.statements.readTable(this.#mt_diff,{keyName: "new_num",
        withTableKey: true,
        assigning: fs_ls_diff_,
        withKey: (i) => {return abap.compare.eq(i.new_num, iv_line_new);},
        withKeyValue: [{key: (i) => {return i.new_num}, value: iv_line_new}],
        usesTableLine: false,
        withKeySimple: {"new_num": iv_line_new}});
      if (abap.compare.ne(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) {
        await abap.Classes['ZCX_ABAPGIT_EXCEPTION'].raise({iv_text: new abap.types.String().set(`Invalid new line number ${abap.templateFormatting(iv_line_new)}`)});
      }
      fs_ls_diff_.get().patch_flag.set(iv_patch_flag);
    }
    async zif_abapgit_diff$set_patch_old(INPUT) {
      let iv_line_old = INPUT?.iv_line_old;
      if (iv_line_old?.getQualifiedName === undefined || iv_line_old.getQualifiedName() !== "I") { iv_line_old = undefined; }
      if (iv_line_old === undefined) { iv_line_old = new abap.types.Integer({qualifiedName: "I"}).set(INPUT.iv_line_old); }
      let iv_patch_flag = INPUT?.iv_patch_flag;
      if (iv_patch_flag?.getQualifiedName === undefined || iv_patch_flag.getQualifiedName() !== "ABAP_BOOL") { iv_patch_flag = undefined; }
      if (iv_patch_flag === undefined) { iv_patch_flag = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}).set(INPUT.iv_patch_flag); }
      let fs_ls_diff_ = new abap.types.FieldSymbol(new abap.types.Structure({
      "patch_flag": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
      "new_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-new_num"}),
      "new": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-NEW"}),
      "result": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-result"}),
      "old_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-old_num"}),
      "old": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-OLD"}),
      "short": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
      "beacon": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-BEACON"})}, "zif_abapgit_definitions=>ty_diff", undefined, {}, {}));
      abap.statements.readTable(this.#mt_diff,{keyName: "old_num",
        withTableKey: true,
        assigning: fs_ls_diff_,
        withKey: (i) => {return abap.compare.eq(i.old_num, iv_line_old);},
        withKeyValue: [{key: (i) => {return i.old_num}, value: iv_line_old}],
        usesTableLine: false,
        withKeySimple: {"old_num": iv_line_old}});
      if (abap.compare.ne(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) {
        await abap.Classes['ZCX_ABAPGIT_EXCEPTION'].raise({iv_text: new abap.types.String().set(`Invalid old line number ${abap.templateFormatting(iv_line_old)}`)});
      }
      fs_ls_diff_.get().patch_flag.set(iv_patch_flag);
    }
    async #shortlist() {
      let lv_index = new abap.types.Integer({qualifiedName: "I"});
      let fs_ls_diff_ = new abap.types.FieldSymbol(new abap.types.Structure({
      "patch_flag": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
      "new_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-new_num"}),
      "new": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-NEW"}),
      "result": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-result"}),
      "old_num": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_definitions=>ty_diff-old_num"}),
      "old": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-OLD"}),
      "short": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
      "beacon": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_DIFF-BEACON"})}, "zif_abapgit_definitions=>ty_diff", undefined, {}, {}));
      if (abap.compare.lt(abap.builtin.lines({val: this.#mt_diff}), abap.IntegerFactory.get(20))) {
        for await (const unique88 of abap.statements.loop(this.#mt_diff)) {
          fs_ls_diff_.assign(unique88);
          fs_ls_diff_.get().short.set(abap.builtin.abap_true);
        }
      } else {
        for await (const unique89 of abap.statements.loop(this.#mt_diff,{where: async (I) => {return abap.compare.initial(I.result) === false && abap.compare.eq(I.short, abap.builtin.abap_false);},topEquals: {"short": abap.builtin.abap_false}})) {
          
          lv_index.set(abap.builtin.sy.get().tabix);
          const indexBackup1 = abap.builtin.sy.get().index.get();
          const unique90 = abap.IntegerFactory.get(8).get();
          for (let unique91 = 0; unique91 < unique90; unique91++) {
            abap.builtin.sy.get().index.set(unique91 + 1);
            abap.statements.readTable(this.#mt_diff,{index: abap.operators.minus(lv_index,abap.builtin.sy.get().index),
              assigning: fs_ls_diff_});
            if (abap.compare.ne(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0)) || abap.compare.eq(fs_ls_diff_.get().short, abap.builtin.abap_true)) {
              break;
            }
            fs_ls_diff_.get().short.set(abap.builtin.abap_true);
          }
          abap.builtin.sy.get().index.set(indexBackup1);
          const indexBackup2 = abap.builtin.sy.get().index.get();
          const unique92 = abap.IntegerFactory.get(8).get();
          for (let unique93 = 0; unique93 < unique92; unique93++) {
            abap.builtin.sy.get().index.set(unique93 + 1);
            abap.statements.readTable(this.#mt_diff,{index: abap.operators.minus(abap.operators.add(lv_index,abap.builtin.sy.get().index),abap.IntegerFactory.get(1)),
              assigning: fs_ls_diff_});
            if (abap.compare.ne(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) {
              break;
            }
            if (!(abap.compare.eq(fs_ls_diff_.get().short, abap.builtin.abap_false))) {
              continue;
            }
            fs_ls_diff_.get().short.set(abap.builtin.abap_true);
          }
          abap.builtin.sy.get().index.set(indexBackup2);
        }
      }
    }
    async zif_abapgit_diff$stats() {
      let rs_count = new abap.types.Structure({
      "insert": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_COUNT-INSERT"}),
      "delete": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_COUNT-DELETE"}),
      "update": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_COUNT-UPDATE"})}, "zif_abapgit_definitions=>ty_count", undefined, {}, {});
      rs_count.set(this.#ms_stats);
      return rs_count;
    }
    async #unpack(INPUT) {
      let iv_new = INPUT?.iv_new;
      if (iv_new?.getQualifiedName === undefined || iv_new.getQualifiedName() !== "XSTRING") { iv_new = undefined; }
      if (iv_new === undefined) { iv_new = new abap.types.XString({qualifiedName: "XSTRING"}).set(INPUT.iv_new); }
      let iv_old = INPUT?.iv_old;
      if (iv_old?.getQualifiedName === undefined || iv_old.getQualifiedName() !== "XSTRING") { iv_old = undefined; }
      if (iv_old === undefined) { iv_old = new abap.types.XString({qualifiedName: "XSTRING"}).set(INPUT.iv_old); }
      let et_new = INPUT?.et_new || abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "RSWSOURCET");
      let et_old = INPUT?.et_old || abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "RSWSOURCET");
      let lv_new = new abap.types.String({qualifiedName: "STRING"});
      let lv_old = new abap.types.String({qualifiedName: "STRING"});
      let lv_new_last = new abap.types.Character(1, {});
      let lv_old_last = new abap.types.Character(1, {});
      lv_new.set((await abap.Classes['ZCL_ABAPGIT_CONVERT'].xstring_to_string_utf8({iv_data: iv_new})));
      lv_old.set((await abap.Classes['ZCL_ABAPGIT_CONVERT'].xstring_to_string_utf8({iv_data: iv_old})));
      if (abap.compare.initial(lv_new) === false) {
        lv_new_last.set(abap.builtin.substring({val: lv_new, off: abap.operators.minus(abap.builtin.strlen({val: lv_new}),abap.IntegerFactory.get(1))}));
      }
      if (abap.compare.initial(lv_old) === false) {
        lv_old_last.set(abap.builtin.substring({val: lv_old, off: abap.operators.minus(abap.builtin.strlen({val: lv_old}),abap.IntegerFactory.get(1))}));
      }
      if (abap.compare.eq(lv_new_last, abap.Classes['CL_ABAP_CHAR_UTILITIES'].newline) && abap.compare.ne(lv_old_last, abap.Classes['CL_ABAP_CHAR_UTILITIES'].newline) && abap.compare.initial(lv_old) === false) {
        lv_old.set(abap.operators.concat(lv_old,abap.Classes['CL_ABAP_CHAR_UTILITIES'].form_feed));
      } else if (abap.compare.ne(lv_new_last, abap.Classes['CL_ABAP_CHAR_UTILITIES'].newline) && abap.compare.eq(lv_old_last, abap.Classes['CL_ABAP_CHAR_UTILITIES'].newline) && abap.compare.initial(lv_new) === false) {
        lv_new.set(abap.operators.concat(lv_new,abap.Classes['CL_ABAP_CHAR_UTILITIES'].form_feed));
      }
      abap.statements.split({source: lv_new, at: abap.Classes['CL_ABAP_CHAR_UTILITIES'].newline, table: et_new});
      abap.statements.split({source: lv_old, at: abap.Classes['CL_ABAP_CHAR_UTILITIES'].newline, table: et_old});
    }
    async #has_line_diff(INPUT) {
      let rv_has_diff = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
      let iv_old = INPUT?.iv_old;
      if (iv_old?.getQualifiedName === undefined || iv_old.getQualifiedName() !== "STRING") { iv_old = undefined; }
      if (iv_old === undefined) { iv_old = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_old); }
      let iv_new = INPUT?.iv_new;
      if (iv_new?.getQualifiedName === undefined || iv_new.getQualifiedName() !== "STRING") { iv_new = undefined; }
      if (iv_new === undefined) { iv_new = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_new); }
      rv_has_diff.set(abap.builtin.boolc(abap.compare.ne(iv_old, iv_new) && (abap.compare.eq(abap.builtin.strlen({val: abap.builtin.condense({val: iv_old})}), abap.IntegerFactory.get(0)) || abap.compare.eq(abap.builtin.strlen({val: abap.builtin.condense({val: iv_new})}), abap.IntegerFactory.get(0)) || abap.compare.ne(abap.builtin.strlen({val: iv_old}), abap.builtin.strlen({val: iv_new})))));
      return rv_has_diff;
    }
  }
  abap.Classes['ZCL_ABAPGIT_DIFF'] = zcl_abapgit_diff;
  zcl_abapgit_diff.c_starting_beacon = new abap.types.Integer({qualifiedName: "I"});
  zcl_abapgit_diff.c_starting_beacon.set(1);
  zcl_abapgit_diff.ty_regexset_tt = abap.types.TableFactory.construct(new abap.types.ABAPObject({qualifiedName: "CL_ABAP_REGEX", RTTIName: "\\CLASS=CL_ABAP_REGEX"}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":["TABLE_LINE"]},"secondary":[]}, "zcl_abapgit_diff=>ty_regexset_tt");
export {zcl_abapgit_diff};