Program: 169230
Project: 169230
Buggy source:
public Alignment<S> localAlignOneSkip(S a,S b){
  float[][] D=new float[a.length() + 1][b.length() + 1];
  float[][] P=new float[a.length() + 1][b.length() + 1];
  float[][] S=new float[a.length() + 1][b.length() + 1];
  float maxValue=0.0f;
  int maxI=0;
  int maxJ=0;
  for (int i=1; i <= a.length(); i++) {
    for (int j=1; j <= b.length(); j++) {
      float sim=(float)a.similarityScore(b,i - 1,j - 1) + this.scoreOffset;
      P[i][j]=Math.max(D[i - 1][j] + this.gapOpen,D[i][j - 1] + this.gapOpen);
      D[i][j]=D[i - 1][j - 1] + sim;
      S[i][j]=Math.max(P[i][j],D[i][j]);
      if (i == a.length())       S[i][j]=Math.max(S[i][j],P[i][j - 1] + this.gapOpen);
      if (j == b.length())       S[i][j]=Math.max(S[i][j],P[i - 1][j] + this.gapOpen);
      if (S[i][j] > maxValue && (i == a.length() || j == b.length())) {
        maxValue=S[i][j];
        maxI=i;
        maxJ=j;
      }
    }
  }
  float score=maxValue;
  int a1=0;
  int a2=maxI - 1;
  int b1=0;
  int b2=maxJ - 1;
  if (this.storePath) {
    ArrayList<Alignment.Operation> backOperations=new ArrayList<>(a.length() + b.length());
    int i=maxI;
    int j=maxJ;
    while (i > 0 && j > 0) {
      if (S[i][j] == D[i - 1][j] + this.gapOpen) {
        backOperations.add(Operation.DELETE);
        i--;
      }
 else       if (S[i][j] == D[i][j - 1] + this.gapOpen) {
        backOperations.add(Operation.INSERT);
        j--;
      }
 else {
        backOperations.add(Operation.MATCH);
        i--;
        j--;
      }
    }
    a1=i;
    b1=j;
    while (i > 0) {
      backOperations.add(Operation.DELETE);
      i--;
    }
    while (j > 0) {
      backOperations.add(Operation.INSERT);
      j--;
    }
    Collections.reverse(backOperations);
    return new Alignment<S>(a,b,a1,a2,b1,b2,score,this.gapOpen,backOperations);
  }
  return new Alignment<S>(a,b,a1,a2,b1,b2,score,this.gapOpen,null);
}

Fixed version (ground truth):
public Alignment<S> localAlignOneSkip(S a,S b){
  float[][] D=new float[a.length() + 1][b.length() + 1];
  float[][] P=new float[a.length() + 1][b.length() + 1];
  float[][] S=new float[a.length() + 1][b.length() + 1];
  float maxValue=0.0f;
  int maxI=0;
  int maxJ=0;
  for (int i=1; i <= a.length(); i++) {
    for (int j=1; j <= b.length(); j++) {
      float sim=(float)a.similarityScore(b,i - 1,j - 1) + this.scoreOffset;
      P[i][j]=Math.max(D[i - 1][j] + this.gapOpen,D[i][j - 1] + this.gapOpen);
      D[i][j]=D[i - 1][j - 1] + sim;
      S[i][j]=Math.max(P[i][j],D[i][j]);
      if (i == a.length())       S[i][j]=Math.max(S[i][j],P[i][j - 1] + this.gapOpen);
      if (j == b.length())       S[i][j]=Math.max(S[i][j],P[i - 1][j] + this.gapOpen);
      if (S[i][j] > maxValue && (i == a.length() || j == b.length())) {
        maxValue=S[i][j];
        maxI=i;
        maxJ=j;
      }
    }
  }
  float score=maxValue;
  int a1=0;
  int a2=Math.max(0,maxI - 1);
  int b1=0;
  int b2=Math.max(0,maxJ - 1);
  if (this.storePath) {
    ArrayList<Alignment.Operation> backOperations=new ArrayList<>(a.length() + b.length());
    int i=maxI;
    int j=maxJ;
    while (i > 0 && j > 0) {
      if (S[i][j] == D[i - 1][j] + this.gapOpen) {
        backOperations.add(Operation.DELETE);
        i--;
      }
 else       if (S[i][j] == D[i][j - 1] + this.gapOpen) {
        backOperations.add(Operation.INSERT);
        j--;
      }
 else {
        backOperations.add(Operation.MATCH);
        i--;
        j--;
      }
    }
    a1=i;
    b1=j;
    while (i > 0) {
      backOperations.add(Operation.DELETE);
      i--;
    }
    while (j > 0) {
      backOperations.add(Operation.INSERT);
      j--;
    }
    Collections.reverse(backOperations);
    return new Alignment<S>(a,b,a1,a2,b1,b2,score,this.gapOpen,backOperations);
  }
  return new Alignment<S>(a,b,a1,a2,b1,b2,score,this.gapOpen,null);
}