Program: 153131
Project: 153131
Buggy source:
public void addWodSort(WOD currWod){
  boolean inserted=false;
  int left=0;
  int right=wods.size() - 1;
  int mid=wods.size() / 2;
  while (inserted == false) {
    WOD nowWod=wods.get(mid);
    if (currWod.getYear() < nowWod.getYear()) {
      right=mid;
      mid=(right + left) / 2;
      if (left == mid || right == mid) {
        inserted=true;
      }
    }
 else     if (currWod.getYear() == nowWod.getYear()) {
      if (currWod.getMonth() < nowWod.getMonth()) {
        right=mid;
        mid=(right + left) / 2;
        if (left == mid || right == mid) {
          wods.add(mid,currWod);
          inserted=true;
        }
      }
 else       if (currWod.getMonth() == nowWod.getMonth()) {
        if (currWod.getDay() < nowWod.getDay()) {
          right=mid;
          mid=(right + left) / 2;
          if (left == mid || right == mid) {
            wods.add(mid,currWod);
            inserted=true;
          }
        }
 else         if (currWod.getDay() > nowWod.getDay()) {
          if (j == wods.size() - 1) {
            left=mid;
            mid=(right + left) / 2;
            if (left == mid || right == mid) {
              wods.add(mid + 1,currWod);
              inserted=true;
            }
          }
        }
      }
 else       if (currWod.getMonth() > nowWod.getMonth()) {
        left=mid;
        mid=(right + left) / 2;
        if (left == mid || right == mid) {
          wods.add(mid + 1,currWod);
          inserted=true;
        }
      }
    }
 else     if (currWod.getYear() > nowWod.getYear()) {
      left=mid;
      mid=(right + left) / 2;
      if (left == mid || right == mid) {
        wods.add(mid + 1,currWod);
        inserted=true;
      }
    }
  }
}

Fixed version (ground truth):
public void addWodSort(WOD currWod){
  boolean inserted=false;
  int left=0;
  int right=wods.size() - 1;
  int mid=wods.size() / 2;
  if (wods.size() == 0) {
    wods.add(currWod);
    return;
  }
  while (inserted == false) {
    WOD nowWod=wods.get(mid);
    if (currWod.getYear() < nowWod.getYear()) {
      right=mid;
      mid=(right + left) / 2;
      if (left == mid || right == mid) {
        inserted=true;
      }
    }
 else     if (currWod.getYear() == nowWod.getYear()) {
      if (currWod.getMonth() < nowWod.getMonth()) {
        right=mid;
        mid=(right + left) / 2;
        if (left == mid || right == mid) {
          wods.add(mid,currWod);
          inserted=true;
        }
      }
 else       if (currWod.getMonth() == nowWod.getMonth()) {
        if (currWod.getDay() < nowWod.getDay()) {
          right=mid;
          mid=(right + left) / 2;
          if (left == mid || right == mid) {
            wods.add(mid,currWod);
            inserted=true;
          }
        }
 else         if (currWod.getDay() > nowWod.getDay()) {
          left=mid;
          mid=(right + left) / 2;
          if (left == mid || right == mid) {
            wods.add(mid + 1,currWod);
            inserted=true;
          }
        }
      }
 else       if (currWod.getMonth() > nowWod.getMonth()) {
        left=mid;
        mid=(right + left) / 2;
        if (left == mid || right == mid) {
          wods.add(mid + 1,currWod);
          inserted=true;
        }
      }
    }
 else     if (currWod.getYear() > nowWod.getYear()) {
      left=mid;
      mid=(right + left) / 2;
      if (left == mid || right == mid) {
        wods.add(mid + 1,currWod);
        inserted=true;
      }
    }
  }
}