Program: 11482
Project: 11482
Buggy source:
private synchronized void computeBurstOffset() throws Exception {
  if (burstOffsetComputed)   return;
  try {
    final int h=mSubSwath[subSwathIndex - 1].latitude.length;
    final int w=mSubSwath[subSwathIndex - 1].latitude[0].length;
    final PosVector earthPoint=new PosVector();
    for (int i=0; i < h; i++) {
      for (int j=0; j < w; j++) {
        final double lat=mSubSwath[subSwathIndex - 1].latitude[i][j];
        final double lon=mSubSwath[subSwathIndex - 1].longitude[i][j];
        final double alt=dem.getElevation(new GeoPos(lat,lon));
        if (alt == demNoDataValue) {
          continue;
        }
        GeoUtils.geo2xyzWGS84(lat,lon,alt,earthPoint);
        final BurstIndices mBurstIndices=getBurstIndices(subSwathIndex,mSU,mOrbit,earthPoint);
        final BurstIndices sBurstIndices=getBurstIndices(subSwathIndex,sSU,sOrbit,earthPoint);
        if (mBurstIndices == null || sBurstIndices == null || (mBurstIndices.firstBurstIndex == -1 && mBurstIndices.secondBurstIndex == -1) || (sBurstIndices.firstBurstIndex == -1 && sBurstIndices.secondBurstIndex == -1)) {
          continue;
        }
        if (mBurstIndices.inUpperPartOfFirstBurst == sBurstIndices.inUpperPartOfFirstBurst) {
          burstOffset=sBurstIndices.firstBurstIndex - mBurstIndices.firstBurstIndex;
        }
 else         if (sBurstIndices.secondBurstIndex != -1 && mBurstIndices.inUpperPartOfFirstBurst == sBurstIndices.inUpperPartOfSecondBurst) {
          burstOffset=sBurstIndices.secondBurstIndex - mBurstIndices.firstBurstIndex;
        }
 else         if (mBurstIndices.secondBurstIndex != -1 && mBurstIndices.inUpperPartOfSecondBurst == sBurstIndices.inUpperPartOfFirstBurst) {
          burstOffset=sBurstIndices.firstBurstIndex - mBurstIndices.secondBurstIndex;
        }
 else         if (mBurstIndices.secondBurstIndex != -1 && sBurstIndices.secondBurstIndex != -1 && mBurstIndices.inUpperPartOfSecondBurst == sBurstIndices.inUpperPartOfSecondBurst) {
          burstOffset=sBurstIndices.secondBurstIndex - mBurstIndices.secondBurstIndex;
        }
        burstOffsetComputed=true;
        return;
      }
    }
  }
 catch (  Throwable t) {
    t.printStackTrace();
  }
}

Fixed version (ground truth):
private synchronized void computeBurstOffset() throws Exception {
  if (burstOffsetComputed)   return;
  try {
    final int h=mSubSwath[subSwathIndex - 1].latitude.length;
    final int w=mSubSwath[subSwathIndex - 1].latitude[0].length;
    final PosVector earthPoint=new PosVector();
    for (int i=0; i < h; i++) {
      for (int j=0; j < w; j++) {
        final double lat=mSubSwath[subSwathIndex - 1].latitude[i][j];
        final double lon=mSubSwath[subSwathIndex - 1].longitude[i][j];
        final double alt=dem.getElevation(new GeoPos(lat,lon));
        if (alt == demNoDataValue) {
          continue;
        }
        GeoUtils.geo2xyzWGS84(lat,lon,alt,earthPoint);
        final BurstIndices mBurstIndices=getBurstIndices(subSwathIndex,mSU,mOrbit,earthPoint);
        final BurstIndices sBurstIndices=getBurstIndices(subSwathIndex,sSU,sOrbit,earthPoint);
        if (mBurstIndices == null || sBurstIndices == null || (mBurstIndices.firstBurstIndex == -1 && mBurstIndices.secondBurstIndex == -1) || (sBurstIndices.firstBurstIndex == -1 && sBurstIndices.secondBurstIndex == -1)) {
          continue;
        }
        if (mBurstIndices.inUpperPartOfFirstBurst == sBurstIndices.inUpperPartOfFirstBurst) {
          burstOffset=sBurstIndices.firstBurstIndex - mBurstIndices.firstBurstIndex;
        }
 else         if (sBurstIndices.secondBurstIndex != -1 && mBurstIndices.inUpperPartOfFirstBurst == sBurstIndices.inUpperPartOfSecondBurst) {
          burstOffset=sBurstIndices.secondBurstIndex - mBurstIndices.firstBurstIndex;
        }
 else         if (mBurstIndices.secondBurstIndex != -1 && mBurstIndices.inUpperPartOfSecondBurst == sBurstIndices.inUpperPartOfFirstBurst) {
          burstOffset=sBurstIndices.firstBurstIndex - mBurstIndices.secondBurstIndex;
        }
 else         if (mBurstIndices.secondBurstIndex != -1 && sBurstIndices.secondBurstIndex != -1 && mBurstIndices.inUpperPartOfSecondBurst == sBurstIndices.inUpperPartOfSecondBurst) {
          burstOffset=sBurstIndices.secondBurstIndex - mBurstIndices.secondBurstIndex;
        }
 else {
          continue;
        }
        burstOffsetComputed=true;
        return;
      }
    }
  }
 catch (  Throwable t) {
    t.printStackTrace();
  }
}