Program: 11555
Project: 11555
Buggy source:
private void getCornerCoords(MetadataElement sceneInfo,MetadataElement geocodedImageInfo){
  int maxRow=0, maxCol=0;
  int minRow=Integer.MAX_VALUE, minCol=Integer.MAX_VALUE;
  final List<CornerCoord> coordList=new ArrayList<CornerCoord>();
  final MetadataElement[] children=sceneInfo.getElements();
  for (  MetadataElement child : children) {
    if (child.getName().equals("String_Node_Str")) {
      final int refRow=child.getAttributeInt("String_Node_Str",0);
      final int refCol=child.getAttributeInt("String_Node_Str",0);
      coordList.add(new CornerCoord(refRow,refCol,(float)child.getAttributeDouble("String_Node_Str",0),(float)child.getAttributeDouble("String_Node_Str",0),(float)child.getAttributeDouble("String_Node_Str",0) * 1000000000f,(float)child.getAttributeDouble("String_Node_Str",0)));
      if (refRow > maxRow)       maxRow=refRow;
      if (refCol > maxCol)       maxCol=refCol;
      if (refRow < minRow)       minRow=refRow;
      if (refCol < minCol)       minCol=refCol;
    }
  }
  int[] indexArray={0,1,2,3};
  if (minRow == maxRow && minCol == maxCol && geocodedImageInfo != null) {
    final MetadataElement geoParameter=geocodedImageInfo.getElement("String_Node_Str");
    final MetadataElement sceneCoordsGeographic=geoParameter.getElement("String_Node_Str");
    final float latUL=(float)sceneCoordsGeographic.getAttributeDouble("String_Node_Str",0);
    final float latUR=(float)sceneCoordsGeographic.getAttributeDouble("String_Node_Str",0);
    final float latLL=(float)sceneCoordsGeographic.getAttributeDouble("String_Node_Str",0);
    final float latLR=(float)sceneCoordsGeographic.getAttributeDouble("String_Node_Str",0);
    final float lonUL=(float)sceneCoordsGeographic.getAttributeDouble("String_Node_Str",0);
    final float lonUR=(float)sceneCoordsGeographic.getAttributeDouble("String_Node_Str",0);
    final float lonLL=(float)sceneCoordsGeographic.getAttributeDouble("String_Node_Str",0);
    final float lonLR=(float)sceneCoordsGeographic.getAttributeDouble("String_Node_Str",0);
    int k=0;
    final double e=1e-3;
    for (    CornerCoord coord : coordList) {
      if (Math.abs(coord.lat - latUL) < e && Math.abs(coord.lon - lonUL) < e) {
        indexArray[k]=0;
      }
 else       if (Math.abs(coord.lat - latUR) < e && Math.abs(coord.lon - lonUR) < e) {
        indexArray[k]=1;
      }
 else       if (Math.abs(coord.lat - latLL) < e && Math.abs(coord.lon - lonLL) < e) {
        indexArray[k]=2;
      }
 else       if (Math.abs(coord.lat - latLR) < e && Math.abs(coord.lon - lonLR) < e) {
        indexArray[k]=3;
      }
      k++;
    }
  }
  int index=0;
  for (  CornerCoord coord : coordList) {
    if (minRow == maxRow && minCol == maxCol) {
      latCorners[indexArray[index]]=coord.lat;
      lonCorners[indexArray[index]]=coord.lon;
      slantRangeCorners[indexArray[index]]=coord.rangeTime;
      incidenceCorners[indexArray[index]]=coord.incidenceAngle;
      ++index;
    }
 else {
      index=-1;
      if (coord.refRow == minRow) {
        if (Math.abs(coord.refCol - minCol) < Math.abs(coord.refCol - maxCol)) {
          index=0;
        }
 else {
          index=1;
        }
      }
 else       if (coord.refRow == maxRow) {
        if (Math.abs(coord.refCol - minCol) < Math.abs(coord.refCol - maxCol)) {
          index=2;
        }
 else {
          index=3;
        }
      }
      if (index >= 0) {
        latCorners[index]=coord.lat;
        lonCorners[index]=coord.lon;
        slantRangeCorners[index]=coord.rangeTime;
        incidenceCorners[index]=coord.incidenceAngle;
      }
    }
  }
}

Fixed version (ground truth):
private void getCornerCoords(MetadataElement sceneInfo,MetadataElement geocodedImageInfo){
  int maxRow=0, maxCol=0;
  int minRow=Integer.MAX_VALUE, minCol=Integer.MAX_VALUE;
  final List<CornerCoord> coordList=new ArrayList<CornerCoord>();
  final MetadataElement[] children=sceneInfo.getElements();
  for (  MetadataElement child : children) {
    if (child.getName().equals("String_Node_Str")) {
      final int refRow=child.getAttributeInt("String_Node_Str",0);
      final int refCol=child.getAttributeInt("String_Node_Str",0);
      coordList.add(new CornerCoord(refRow,refCol,(float)child.getAttributeDouble("String_Node_Str",0),(float)child.getAttributeDouble("String_Node_Str",0),(float)child.getAttributeDouble("String_Node_Str",0) * 1000000000f,(float)child.getAttributeDouble("String_Node_Str",0)));
      if (refRow > maxRow)       maxRow=refRow;
      if (refCol > maxCol)       maxCol=refCol;
      if (refRow < minRow)       minRow=refRow;
      if (refCol < minCol)       minCol=refCol;
    }
  }
  int[] indexArray={0,1,2,3};
  if (minRow == maxRow && minCol == maxCol && geocodedImageInfo != null) {
    final MetadataElement geoParameter=geocodedImageInfo.getElement("String_Node_Str");
    final MetadataElement sceneCoordsGeographic=geoParameter.getElement("String_Node_Str");
    final float latUL=(float)sceneCoordsGeographic.getAttributeDouble("String_Node_Str",0);
    final float latUR=(float)sceneCoordsGeographic.getAttributeDouble("String_Node_Str",0);
    final float latLL=(float)sceneCoordsGeographic.getAttributeDouble("String_Node_Str",0);
    final float latLR=(float)sceneCoordsGeographic.getAttributeDouble("String_Node_Str",0);
    final float lonUL=(float)sceneCoordsGeographic.getAttributeDouble("String_Node_Str",0);
    final float lonUR=(float)sceneCoordsGeographic.getAttributeDouble("String_Node_Str",0);
    final float lonLL=(float)sceneCoordsGeographic.getAttributeDouble("String_Node_Str",0);
    final float lonLR=(float)sceneCoordsGeographic.getAttributeDouble("String_Node_Str",0);
    int k=0;
    double d0, d1, d2, d3;
    for (    CornerCoord coord : coordList) {
      d0=Math.abs(coord.lat - latUL) + Math.abs(coord.lon - lonUL);
      d1=Math.abs(coord.lat - latUR) + Math.abs(coord.lon - lonUR);
      d2=Math.abs(coord.lat - latLL) + Math.abs(coord.lon - lonLL);
      d3=Math.abs(coord.lat - latLR) + Math.abs(coord.lon - lonLR);
      if (d0 <= d1 && d0 <= d2 && d0 <= d3) {
        indexArray[k]=0;
      }
 else       if (d1 <= d0 && d1 <= d2 && d1 <= d3) {
        indexArray[k]=1;
      }
 else       if (d2 <= d0 && d2 <= d1 && d2 <= d3) {
        indexArray[k]=2;
      }
 else       if (d3 <= d0 && d3 <= d1 && d3 <= d2) {
        indexArray[k]=3;
      }
      k++;
    }
  }
  int index=0;
  for (  CornerCoord coord : coordList) {
    if (minRow == maxRow && minCol == maxCol) {
      latCorners[indexArray[index]]=coord.lat;
      lonCorners[indexArray[index]]=coord.lon;
      slantRangeCorners[indexArray[index]]=coord.rangeTime;
      incidenceCorners[indexArray[index]]=coord.incidenceAngle;
      ++index;
    }
 else {
      index=-1;
      if (coord.refRow == minRow) {
        if (Math.abs(coord.refCol - minCol) < Math.abs(coord.refCol - maxCol)) {
          index=0;
        }
 else {
          index=1;
        }
      }
 else       if (coord.refRow == maxRow) {
        if (Math.abs(coord.refCol - minCol) < Math.abs(coord.refCol - maxCol)) {
          index=2;
        }
 else {
          index=3;
        }
      }
      if (index >= 0) {
        latCorners[index]=coord.lat;
        lonCorners[index]=coord.lon;
        slantRangeCorners[index]=coord.rangeTime;
        incidenceCorners[index]=coord.incidenceAngle;
      }
    }
  }
}