Program: 11492
Project: 11492
Buggy source:
public SLCImage(MetadataElement element){
  this();
  this.sensor=element.getAttributeString(AbstractMetadata.MISSION);
  this.mission=sensor;
  this.orbitNumber=element.getAttributeInt(AbstractMetadata.REL_ORBIT);
  this.radar_wavelength=(LIGHT_SPEED / MEGA) / element.getAttributeDouble(AbstractMetadata.radar_frequency);
  this.PRF=element.getAttributeDouble(AbstractMetadata.pulse_repetition_frequency);
  final String t_azi1_UTC=element.getAttributeUTC(AbstractMetadata.first_line_time).toString();
  this.mjd=element.getAttributeUTC(AbstractMetadata.first_line_time).getMJD();
  this.tAzi1=DateUtils.dateTimeToSecOfDay(t_azi1_UTC);
  this.rangeBandwidth=element.getAttributeDouble(AbstractMetadata.range_bandwidth);
  this.azimuthBandwidth=element.getAttributeDouble(AbstractMetadata.azimuth_bandwidth);
  this.rsr2x=(element.getAttributeDouble(AbstractMetadata.range_sampling_rate) * MEGA * 2);
  this.tRange1=element.getAttributeDouble(AbstractMetadata.slant_range_to_first_pixel) / LIGHT_SPEED;
  this.approxRadarCentreOriginal.x=element.getAttributeDouble(AbstractMetadata.num_samples_per_line) / 2.0d;
  this.approxRadarCentreOriginal.y=element.getAttributeDouble(AbstractMetadata.num_output_lines) / 2.0d;
  this.approxGeoCentreOriginal.lat=(float)((element.getAttributeDouble(AbstractMetadata.first_near_lat) + element.getAttributeDouble(AbstractMetadata.first_far_lat) + element.getAttributeDouble(AbstractMetadata.last_near_lat)+ element.getAttributeDouble(AbstractMetadata.last_far_lat)) / 4);
  this.approxGeoCentreOriginal.lon=(float)((element.getAttributeDouble(AbstractMetadata.first_near_long) + element.getAttributeDouble(AbstractMetadata.first_far_long) + element.getAttributeDouble(AbstractMetadata.last_near_long)+ element.getAttributeDouble(AbstractMetadata.last_far_long)) / 4);
  final double[] xyz=new double[3];
  Ellipsoid.ell2xyz(getApproxGeoCentreOriginal(),xyz);
  this.approxXYZCentreOriginal.x=xyz[0];
  this.approxXYZCentreOriginal.y=xyz[1];
  this.approxXYZCentreOriginal.z=xyz[2];
  final int pix0=element.getAttributeInt(AbstractMetadata.subset_offset_x);
  final int pixN=pix0 + element.getAttributeInt(AbstractMetadata.num_samples_per_line);
  final int lin0=element.getAttributeInt(AbstractMetadata.subset_offset_y);
  final int linN=lin0 + element.getAttributeInt(AbstractMetadata.num_output_lines);
  this.currentWindow=new Window(lin0,linN,pix0,pixN);
  final AbstractMetadata.DopplerCentroidCoefficientList[] dopplersArray=AbstractMetadata.getDopplerCentroidCoefficients(element);
  final String t_azi_original=dopplersArray[0].time.toString();
  this.tAzi_original=DateUtils.dateTimeToSecOfDay(t_azi_original);
  if (dopplersArray[0].coefficients.length > 0)   this.doppler.f_DC_a0=dopplersArray[0].coefficients[0];
  if (dopplersArray[0].coefficients.length > 1)   this.doppler.f_DC_a1=dopplersArray[0].coefficients[1];
  if (dopplersArray[0].coefficients.length > 2)   this.doppler.f_DC_a2=dopplersArray[0].coefficients[2];
  this.doppler.checkConstant();
  this.mlAz=(int)element.getAttributeDouble(AbstractMetadata.azimuth_looks);
  this.mlRg=(int)element.getAttributeDouble(AbstractMetadata.range_looks);
}

Fixed version (ground truth):
public SLCImage(MetadataElement element){
  this();
  this.sensor=element.getAttributeString(AbstractMetadata.MISSION);
  this.mission=sensor;
  this.orbitNumber=element.getAttributeInt(AbstractMetadata.REL_ORBIT);
  this.radar_wavelength=(LIGHT_SPEED / MEGA) / element.getAttributeDouble(AbstractMetadata.radar_frequency);
  this.PRF=element.getAttributeDouble(AbstractMetadata.pulse_repetition_frequency);
  final String t_azi1_UTC=element.getAttributeUTC(AbstractMetadata.first_line_time).toString();
  this.mjd=element.getAttributeUTC(AbstractMetadata.first_line_time).getMJD();
  this.tAzi1=DateUtils.dateTimeToSecOfDay(t_azi1_UTC);
  this.lineTimeInterval=element.getAttributeDouble(AbstractMetadata.line_time_interval);
  this.rangeBandwidth=element.getAttributeDouble(AbstractMetadata.range_bandwidth);
  this.azimuthBandwidth=element.getAttributeDouble(AbstractMetadata.azimuth_bandwidth);
  this.rsr2x=(element.getAttributeDouble(AbstractMetadata.range_sampling_rate) * MEGA * 2);
  this.tRange1=element.getAttributeDouble(AbstractMetadata.slant_range_to_first_pixel) / LIGHT_SPEED;
  this.approxRadarCentreOriginal.x=element.getAttributeDouble(AbstractMetadata.num_samples_per_line) / 2.0d;
  this.approxRadarCentreOriginal.y=element.getAttributeDouble(AbstractMetadata.num_output_lines) / 2.0d;
  this.approxGeoCentreOriginal.lat=(float)((element.getAttributeDouble(AbstractMetadata.first_near_lat) + element.getAttributeDouble(AbstractMetadata.first_far_lat) + element.getAttributeDouble(AbstractMetadata.last_near_lat)+ element.getAttributeDouble(AbstractMetadata.last_far_lat)) / 4);
  this.approxGeoCentreOriginal.lon=(float)((element.getAttributeDouble(AbstractMetadata.first_near_long) + element.getAttributeDouble(AbstractMetadata.first_far_long) + element.getAttributeDouble(AbstractMetadata.last_near_long)+ element.getAttributeDouble(AbstractMetadata.last_far_long)) / 4);
  final double[] xyz=new double[3];
  Ellipsoid.ell2xyz(getApproxGeoCentreOriginal(),xyz);
  this.approxXYZCentreOriginal.x=xyz[0];
  this.approxXYZCentreOriginal.y=xyz[1];
  this.approxXYZCentreOriginal.z=xyz[2];
  final int pix0=element.getAttributeInt(AbstractMetadata.subset_offset_x);
  final int pixN=pix0 + element.getAttributeInt(AbstractMetadata.num_samples_per_line);
  final int lin0=element.getAttributeInt(AbstractMetadata.subset_offset_y);
  final int linN=lin0 + element.getAttributeInt(AbstractMetadata.num_output_lines);
  this.currentWindow=new Window(lin0,linN,pix0,pixN);
  final AbstractMetadata.DopplerCentroidCoefficientList[] dopplersArray=AbstractMetadata.getDopplerCentroidCoefficients(element);
  final String t_azi_original=dopplersArray[0].time.toString();
  this.tAzi_original=DateUtils.dateTimeToSecOfDay(t_azi_original);
  if (dopplersArray[0].coefficients.length > 0)   this.doppler.f_DC_a0=dopplersArray[0].coefficients[0];
  if (dopplersArray[0].coefficients.length > 1)   this.doppler.f_DC_a1=dopplersArray[0].coefficients[1];
  if (dopplersArray[0].coefficients.length > 2)   this.doppler.f_DC_a2=dopplersArray[0].coefficients[2];
  this.doppler.checkConstant();
  this.mlAz=(int)element.getAttributeDouble(AbstractMetadata.azimuth_looks);
  this.mlRg=(int)element.getAttributeDouble(AbstractMetadata.range_looks);
}