nus-yam/ex-repair huggingface dataset:
Program: 11175
Project: 11175
Buggy source:
public long applyStateIterator(WorldWindow wwd){
  if (!(wwd.getView() instanceof OrbitView))   return 0;
  OrbitView view=(OrbitView)wwd.getView();
  Position beginCenter=view.getCenterPosition();
  long lengthMillis=Util.getScaledLengthMillis(beginCenter,center);
  view.addAnimator(FlyToOrbitViewAnimator.createFlyToOrbitViewAnimator(view,beginCenter,new Position(center,0),view.getHeading(),Angle.ZERO,view.getPitch(),Angle.ZERO,view.getZoom(),zoom,lengthMillis,true));
  return lengthMillis;
}

Fixed version (ground truth):
public long applyStateIterator(WorldWindow wwd){
  if (!(wwd.getView() instanceof OrbitView))   return 0;
  OrbitView view=(OrbitView)wwd.getView();
  Position beginCenter=view.getCenterPosition();
  long lengthMillis=Util.getScaledLengthMillis(beginCenter,center);
  view.addAnimator(FlyToOrbitViewAnimator.createFlyToOrbitViewAnimator(view,beginCenter,new Position(center,0),view.getHeading(),Angle.ZERO,view.getPitch(),Angle.ZERO,view.getZoom(),zoom,lengthMillis,true));
  wwd.redraw();
  return lengthMillis;
}
Program: 11176
Project: 11176
Buggy source:
protected GDALTile(GDALTile tile,ByteBuffer buffer,int bufferType,int bufferTypeSize){
  this.buffer=buffer;
  this.bufferType=bufferType;
  this.bufferTypeSize=bufferTypeSize;
  this.width=tile.width;
  this.height=tile.height;
  this.minLatitude=tile.minLatitude;
  this.minLongitude=tile.minLongitude;
  this.maxLatitude=tile.maxLatitude;
  this.maxLongitude=tile.maxLongitude;
  this.addAlpha=tile.addAlpha;
  this.selectedBand=tile.selectedBand;
  this.dataRectangle=tile.dataRectangle;
  this.bufferBandCount=tile.bufferBandCount;
  this.indexed=tile.indexed;
  this.indexColorModel=tile.indexColorModel;
}

Fixed version (ground truth):
protected GDALTile(GDALTile tile,ByteBuffer buffer,int bufferType,int bufferTypeSize,boolean floatingPoint){
  this.buffer=buffer;
  this.bufferType=bufferType;
  this.bufferTypeSize=bufferTypeSize;
  this.floatingPoint=floatingPoint;
  this.width=tile.width;
  this.height=tile.height;
  this.minLatitude=tile.minLatitude;
  this.minLongitude=tile.minLongitude;
  this.maxLatitude=tile.maxLatitude;
  this.maxLongitude=tile.maxLongitude;
  this.addAlpha=tile.addAlpha;
  this.selectedBand=tile.selectedBand;
  this.dataRectangle=tile.dataRectangle;
  this.bufferBandCount=tile.bufferBandCount;
  this.indexed=tile.indexed;
  this.indexColorModel=tile.indexColorModel;
}
Program: 11177
Project: 11177
Buggy source:
public void fillOutside(int[] values) throws TilerException {
  if (values.length != bufferBandCount)   throw new IllegalArgumentException("String_Node_Str");
  if (dataRectangle.x == 0 && dataRectangle.y == 0 && dataRectangle.width == width && dataRectangle.height == height)   return;
  for (int x=0; x < width; x++) {
    for (int y=0; y < height; y++) {
      if (!dataRectangle.contains(x,y)) {
        for (int b=0; b < bufferBandCount; b++) {
          int index=getBufferIndex(x,y,b) * bufferTypeSize;
          if (bufferType == gdalconstConstants.GDT_Byte) {
            buffer.put(index,(byte)values[b]);
          }
 else           if (bufferType == gdalconstConstants.GDT_Int16 || bufferType == gdalconstConstants.GDT_UInt16) {
            buffer.putShort(index,(short)values[b]);
          }
 else           if (bufferType == gdalconstConstants.GDT_Int32 || bufferType == gdalconstConstants.GDT_UInt32) {
            buffer.putInt(index,values[b]);
          }
 else {
            throw new TilerException("String_Node_Str");
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
public void fillOutside(NumberArray values) throws TilerException {
  if (values.length() != bufferBandCount)   throw new IllegalArgumentException("String_Node_Str");
  if (dataRectangle.x == 0 && dataRectangle.y == 0 && dataRectangle.width == width && dataRectangle.height == height)   return;
  for (int x=0; x < width; x++) {
    for (int y=0; y < height; y++) {
      if (!dataRectangle.contains(x,y)) {
        for (int b=0; b < bufferBandCount; b++) {
          int index=getBufferIndex(x,y,b) * bufferTypeSize;
          if (floatingPoint)           putDoubleValue(index,buffer,bufferType,values.getDouble(b));
 else           putLongValue(index,buffer,bufferType,values.getLong(b));
        }
      }
    }
  }
}
Program: 11180
Project: 11180
Buggy source:
public GDALTile convertToType(int newBufferType){
  if (newBufferType == bufferType)   return this;
  int newBufferTypeSize=gdal.GetDataTypeSize(newBufferType) / 8;
  if (!(bufferType == gdalconstConstants.GDT_Byte || bufferType == gdalconstConstants.GDT_Float32 || bufferType == gdalconstConstants.GDT_Float64 || bufferType == gdalconstConstants.GDT_Int16 || bufferType == gdalconstConstants.GDT_Int32 || bufferType == gdalconstConstants.GDT_UInt16 || bufferType == gdalconstConstants.GDT_UInt32))   throw new IllegalStateException("String_Node_Str");
  if (!(newBufferType == gdalconstConstants.GDT_Byte || newBufferType == gdalconstConstants.GDT_Float32 || newBufferType == gdalconstConstants.GDT_Float64 || newBufferType == gdalconstConstants.GDT_Int16 || newBufferType == gdalconstConstants.GDT_Int32 || newBufferType == gdalconstConstants.GDT_UInt16 || newBufferType == gdalconstConstants.GDT_UInt32))   throw new IllegalArgumentException("String_Node_Str");
  int size=buffer.limit() / bufferTypeSize;
  ByteBuffer newBuffer=ByteBuffer.allocateDirect(size * newBufferTypeSize);
  newBuffer.order(buffer.order());
  buffer.rewind();
  while (buffer.hasRemaining()) {
    copy(buffer,newBuffer,bufferType,newBufferType);
  }
  buffer.rewind();
  newBuffer.rewind();
  return new GDALTile(this,newBuffer,newBufferType,newBufferTypeSize);
}

Fixed version (ground truth):
public GDALTile convertToType(int newBufferType){
  if (newBufferType == bufferType)   return this;
  int newBufferTypeSize=gdal.GetDataTypeSize(newBufferType) / 8;
  boolean newFloatingPoint=isTypeFloatingPoint(newBufferType);
  int size=buffer.limit() / bufferTypeSize;
  ByteBuffer newBuffer=ByteBuffer.allocateDirect(size * newBufferTypeSize);
  newBuffer.order(buffer.order());
  long lvalue=0;
  double dvalue=0;
  buffer.rewind();
  while (buffer.hasRemaining()) {
    if (floatingPoint) {
      dvalue=getDoubleValue(buffer,bufferType);
      lvalue=(long)dvalue;
    }
 else {
      lvalue=getLongValue(buffer,bufferType);
      dvalue=lvalue;
    }
    if (newFloatingPoint)     putDoubleValue(newBuffer,newBufferType,dvalue);
 else     putLongValue(newBuffer,newBufferType,lvalue);
  }
  buffer.rewind();
  newBuffer.rewind();
  return new GDALTile(this,newBuffer,newBufferType,newBufferTypeSize,newFloatingPoint);
}
Program: 11182
Project: 11182
Buggy source:
private void createLoggerPopupMenu(){
  final String preferenceKey="String_Node_Str";
  Level prefLevel=Level.FINE;
  try {
    String prefLevelStr=preferences.get(preferenceKey,prefLevel.getName());
    prefLevel=Level.parse(prefLevelStr);
  }
 catch (  Exception e) {
  }
  logger.setLevel(prefLevel);
  loggerPopup=new JPopupMenu();
  Level[] levels=new Level[]{Level.FINEST,Level.FINER,Level.FINE,Level.INFO,Level.WARNING,Level.SEVERE};
  ButtonGroup bg=new ButtonGroup();
  for (  final Level level : levels) {
    JRadioButtonMenuItem menuItem=new JRadioButtonMenuItem(new AbstractAction(level.getName()){
      public void actionPerformed(      ActionEvent e){
        logger.setLevel(level);
        preferences.put(preferenceKey,level.getName());
      }
    }
);
    loggerPopup.add(menuItem);
    bg.add(menuItem);
    menuItem.setSelected(logger.getLevel().equals(level));
  }
  MouseListener ml=new MouseAdapter(){
    public void mousePressed(    MouseEvent e){
      maybeShowPopup(e);
    }
    public void mouseReleased(    MouseEvent e){
      maybeShowPopup(e);
    }
    private void maybeShowPopup(    MouseEvent e){
      if (e.isPopupTrigger()) {
        loggerPopup.show(e.getComponent(),e.getX(),e.getY());
      }
    }
  }
;
  textLog.addMouseListener(ml);
}

Fixed version (ground truth):
private void createLoggerPopupMenu(){
  final String preferenceKey="String_Node_Str";
  Level prefLevel=Level.INFO;
  try {
    String prefLevelStr=preferences.get(preferenceKey,prefLevel.getName());
    prefLevel=Level.parse(prefLevelStr);
  }
 catch (  Exception e) {
  }
  logger.setLevel(prefLevel);
  loggerPopup=new JPopupMenu();
  Level[] levels=new Level[]{Level.FINEST,Level.FINER,Level.FINE,Level.INFO,Level.WARNING,Level.SEVERE};
  ButtonGroup bg=new ButtonGroup();
  for (  final Level level : levels) {
    JRadioButtonMenuItem menuItem=new JRadioButtonMenuItem(new AbstractAction(level.getName()){
      public void actionPerformed(      ActionEvent e){
        logger.setLevel(level);
        preferences.put(preferenceKey,level.getName());
      }
    }
);
    loggerPopup.add(menuItem);
    bg.add(menuItem);
    menuItem.setSelected(logger.getLevel().equals(level));
  }
  MouseListener ml=new MouseAdapter(){
    public void mousePressed(    MouseEvent e){
      maybeShowPopup(e);
    }
    public void mouseReleased(    MouseEvent e){
      maybeShowPopup(e);
    }
    private void maybeShowPopup(    MouseEvent e){
      if (e.isPopupTrigger()) {
        loggerPopup.show(e.getComponent(),e.getX(),e.getY());
      }
    }
  }
;
  textLog.addMouseListener(ml);
}
Program: 11183
Project: 11183
Buggy source:
private void tileTypeChanged(){
  if (!tilesizeChanged) {
    tilesizeBeingSet=true;
    if (elevationRadio.isSelected()) {
      tilesizeField.setValue(150);
    }
 else {
      tilesizeField.setValue(512);
    }
    tilesizeBeingSet=false;
  }
  if (!lztsChanged) {
    lztsBeingSet=true;
    if (elevationRadio.isSelected()) {
      lztsField.setValue(20d);
    }
 else {
      lztsField.setValue(36d);
    }
    lztsBeingSet=false;
  }
  bandCountChanged();
}

Fixed version (ground truth):
private void tileTypeChanged(){
  if (!tilesizeChanged) {
    tilesizeBeingSet=true;
    if (elevationRadio.isSelected()) {
      tilesizeField.setValue(150);
    }
 else {
      tilesizeField.setValue(512);
    }
    tilesizeBeingSet=false;
  }
  if (!lztsChanged) {
    lztsBeingSet=true;
    if (elevationRadio.isSelected()) {
      lztsField.setValue(20d);
    }
 else {
      lztsField.setValue(36d);
    }
    lztsBeingSet=false;
  }
  bandCountChanged();
  tilesizeChanged();
}
Program: 11187
Project: 11187
Buggy source:
@Override public void focusLost(FocusEvent e){
  JIntegerField jif=(JIntegerField)e.getSource();
  if (jif.getValue() == null)   jif.setValue(0);
}

Fixed version (ground truth):
@Override public void focusLost(FocusEvent e){
  if (e.getSource() instanceof JLongField) {
    JLongField jif=(JLongField)e.getSource();
    if (jif.getValue() == null)     jif.setValue(0l);
  }
 else   if (e.getSource() instanceof JDoubleField) {
    JDoubleField jdf=(JDoubleField)e.getSource();
    if (jdf.getValue() == null)     jdf.setValue(0d);
  }
}
Program: 11189
Project: 11189
Buggy source:
private void visibledFields(){
  boolean mapnik=mapnikRadio.isSelected();
  tileTypeLabel.setVisible(!mapnik);
  imageRadio.setVisible(!mapnik);
  elevationRadio.setVisible(!mapnik);
  boolean images=mapnik || imageRadio.isSelected();
  imageFormatLabel.setVisible(images);
  jpegRadio.setVisible(images);
  pngRadio.setVisible(images);
  alphaCheck.setVisible(pngRadio.isSelected() && bandCount == 3 && !mapnik && !elevationRadio.isSelected());
  boolean elevations=elevationRadio.isSelected() && !mapnik;
  bandLabel.setVisible(elevations);
  bandCombo.setVisible(elevations);
  cellTypeLabel.setVisible(elevations);
  byteRadio.setVisible(elevations);
  int16Radio.setVisible(elevations);
  int32Radio.setVisible(elevations);
  levelsLabel.setVisible(mapnik);
  levelsSpinner.setVisible(mapnik);
  overrideLevelsCheck.setVisible(!mapnik);
  overrideLevelsSpinner.setVisible(!mapnik);
  outsideCheck.setVisible(!mapnik);
  outsidePanel.setVisible(!mapnik);
  replaceCheck.setVisible(!mapnik);
  replace1Label.setVisible(!mapnik);
  replace2Label.setVisible(!mapnik);
  replace3Label.setVisible(!mapnik);
  replace4Label.setVisible(!mapnik);
  minPanel.setVisible(!mapnik);
  maxPanel.setVisible(!mapnik);
  withPanel.setVisible(!mapnik);
  otherwisePanel.setVisible(!mapnik);
}

Fixed version (ground truth):
private void visibledFields(){
  boolean mapnik=mapnikRadio.isSelected();
  tileTypeLabel.setVisible(!mapnik);
  imageRadio.setVisible(!mapnik);
  elevationRadio.setVisible(!mapnik);
  boolean images=mapnik || imageRadio.isSelected();
  imageFormatLabel.setVisible(images);
  jpegRadio.setVisible(images);
  pngRadio.setVisible(images);
  alphaCheck.setVisible(pngRadio.isSelected() && bandCount == 3 && !mapnik && !elevationRadio.isSelected());
  boolean elevations=elevationRadio.isSelected() && !mapnik;
  bandLabel.setVisible(elevations);
  bandCombo.setVisible(elevations);
  cellTypeLabel.setVisible(elevations);
  byteRadio.setVisible(elevations);
  int16Radio.setVisible(elevations);
  int32Radio.setVisible(elevations);
  float32Radio.setVisible(elevations);
  levelsLabel.setVisible(mapnik);
  levelsSpinner.setVisible(mapnik);
  overrideLevelsCheck.setVisible(!mapnik);
  overrideLevelsSpinner.setVisible(!mapnik);
  outsideCheck.setVisible(!mapnik);
  outsidePanel.setVisible(!mapnik);
  replaceCheck.setVisible(!mapnik);
  replace1Label.setVisible(!mapnik);
  replace2Label.setVisible(!mapnik);
  replace3Label.setVisible(!mapnik);
  replace4Label.setVisible(!mapnik);
  minPanel.setVisible(!mapnik);
  maxPanel.setVisible(!mapnik);
  withPanel.setVisible(!mapnik);
  otherwisePanel.setVisible(!mapnik);
}
Program: 11192
Project: 11192
Buggy source:
private static <E extends Buffer>E selectBuffer(E src0,E src1,E src2,E src3,int x,int y,int w,int h){
  return (x < w / 2) ? (y < h / 2 ? src1 : src0) : (y < h / 2 ? src3 : src2);
}

Fixed version (ground truth):
private <E extends Buffer>E selectBuffer(E src0,E src1,E src2,E src3,int x,int y,int w,int h){
  return (x < w / 2) ? (y < h / 2 ? src1 : src0) : (y < h / 2 ? src3 : src2);
}
Program: 11193
Project: 11193
Buggy source:
private static ByteBuffer getFileChannelAsByteBuffer(FileChannel fileChannel,int length,ByteOrder byteOrder) throws IOException {
  ByteBuffer bb=ByteBuffer.allocate(length);
  bb.order(byteOrder);
  fileChannel.read(bb);
  bb.rewind();
  return bb;
}

Fixed version (ground truth):
private ByteBuffer getFileChannelAsByteBuffer(FileChannel fileChannel,int length,ByteOrder byteOrder) throws IOException {
  ByteBuffer bb=ByteBuffer.allocate(length);
  bb.order(byteOrder);
  fileChannel.read(bb);
  bb.rewind();
  return bb;
}
Program: 11194
Project: 11194
Buggy source:
public static void createElevationOverviews(File directory,int width,int height,int bufferType,ByteOrder byteOrder,int[] outsideValues,Sector sector,double lzts,ProgressReporter reporter){
  createOverviews(true,directory,"String_Node_Str",width,height,bufferType,byteOrder,outsideValues,sector,lzts,reporter);
}

Fixed version (ground truth):
public static void createElevationOverviews(File directory,int width,int height,int bufferType,ByteOrder byteOrder,NumberArray outsideValues,Sector sector,double lzts,ProgressReporter reporter){
  int bands=1;
  OverviewCreator overviewCreator=new ElevationOverviewCreator(width,height,bands,bufferType,byteOrder,outsideValues);
  createOverviews(overviewCreator,directory,"String_Node_Str",sector,lzts,reporter);
}
Program: 11195
Project: 11195
Buggy source:
public static void createImageOverviews(File directory,String extension,int width,int height,int[] outsideValues,Sector sector,double lzts,ProgressReporter reporter){
  createOverviews(false,directory,extension,width,height,1,null,outsideValues,sector,lzts,reporter);
}

Fixed version (ground truth):
public static void createImageOverviews(File directory,String extension,int width,int height,NumberArray outsideValues,Sector sector,double lzts,ProgressReporter reporter){
  OverviewCreator overviewCreator=new ImageOverviewCreator(width,height,outsideValues);
  createOverviews(overviewCreator,directory,extension,sector,lzts,reporter);
}
Program: 11197
Project: 11197
Buggy source:
public static void tileElevations(Dataset dataset,Sector sector,int level,int tilesize,double lzts,int bufferType,int band,int[] outsideValues,int[] minReplace,int[] maxReplace,Integer[] replace,Integer[] otherwise,File outputDirectory,ProgressReporter progress){
  tile(Type.Elevations,dataset,null,sector,level,tilesize,lzts,null,false,bufferType,band,outsideValues,minReplace,maxReplace,replace,otherwise,outputDirectory,progress);
}

Fixed version (ground truth):
public static void tileElevations(Dataset dataset,Sector sector,int level,int tilesize,double lzts,int bufferType,int band,NumberArray outsideValues,NumberArray minReplace,NumberArray maxReplace,NullableNumberArray replace,NullableNumberArray otherwise,NumberArray minMax,File outputDirectory,ProgressReporter progress){
  tile(Type.Elevations,dataset,null,sector,level,tilesize,lzts,null,false,bufferType,band,outsideValues,minReplace,maxReplace,replace,otherwise,minMax,outputDirectory,progress);
}
Program: 11199
Project: 11199
Buggy source:
public static void tileImages(Dataset dataset,Sector sector,int level,int tilesize,double lzts,String imageFormat,boolean addAlpha,int[] outsideValues,int[] minReplace,int[] maxReplace,Integer[] replace,Integer[] otherwise,File outputDirectory,ProgressReporter progress){
  tile(Type.Images,dataset,null,sector,level,tilesize,lzts,imageFormat,addAlpha,-1,-1,outsideValues,minReplace,maxReplace,replace,otherwise,outputDirectory,progress);
}

Fixed version (ground truth):
public static void tileImages(Dataset dataset,Sector sector,int level,int tilesize,double lzts,String imageFormat,boolean addAlpha,NumberArray outsideValues,NumberArray minReplace,NumberArray maxReplace,NullableNumberArray replace,NullableNumberArray otherwise,File outputDirectory,ProgressReporter progress){
  tile(Type.Images,dataset,null,sector,level,tilesize,lzts,imageFormat,addAlpha,-1,-1,outsideValues,minReplace,maxReplace,replace,otherwise,null,outputDirectory,progress);
}
Program: 11200
Project: 11200
Buggy source:
public static void tileMapnik(File mapFile,Sector sector,int level,int tilesize,double lzts,String imageFormat,File outputDirectory,ProgressReporter progress){
  tile(Type.Mapnik,null,mapFile,sector,level,tilesize,lzts,imageFormat,false,-1,-1,null,null,null,null,null,outputDirectory,progress);
}

Fixed version (ground truth):
public static void tileMapnik(File mapFile,Sector sector,int level,int tilesize,double lzts,String imageFormat,File outputDirectory,ProgressReporter progress){
  tile(Type.Mapnik,null,mapFile,sector,level,tilesize,lzts,imageFormat,false,-1,-1,null,null,null,null,null,null,outputDirectory,progress);
}
Program: 11203
Project: 11203
Buggy source:
public MaskUrlBuilder(File localTextureDir,File localMaskDir,String textureExtension,String maskExtension){
  this.localTextureDir=localTextureDir;
  this.localMaskDir=localMaskDir;
  this.textureExtension=(textureExtension.startsWith("String_Node_Str") ? "String_Node_Str" : "String_Node_Str") + textureExtension;
  this.maskExtension=(maskExtension.startsWith("String_Node_Str") ? "String_Node_Str" : "String_Node_Str") + maskExtension;
}

Fixed version (ground truth):
public MaskUrlBuilder(File localTextureDir,File localMaskDir,String textureExtension,String maskExtension){
  this.localTextureDir=localTextureDir;
  this.localMaskDir=localMaskDir;
  this.textureExtension=textureExtension == null ? null : (textureExtension.startsWith("String_Node_Str") ? "String_Node_Str" : "String_Node_Str") + textureExtension;
  this.maskExtension=maskExtension == null ? null : (maskExtension.startsWith("String_Node_Str") ? "String_Node_Str" : "String_Node_Str") + maskExtension;
}
Program: 11205
Project: 11205
Buggy source:
public void stateChanged(ChangeEvent e){
  if (!settingSlider) {
    if (animation.size() > 0) {
      applyView(getView());
      wwd.redraw();
    }
    stop=true;
  }
}

Fixed version (ground truth):
public void stateChanged(ChangeEvent e){
  int value=((JSlider)e.getSource()).getValue();
  Vec4 pos=elevationImage.getSunPosition();
  pos=new Vec4(pos.x,pos.y,value / 1000d);
  elevationImage.setSunPosition(pos);
  wwd.redraw();
}
Program: 11207
Project: 11207
Buggy source:
@Override public SectorGeometryList tessellate(DrawContext dc){
  SectorGeometryList sgl=super.tessellate(dc);
  int count=0;
  minElevation=Double.MAX_VALUE;
  maxElevation=-Double.MAX_VALUE;
  for (  SectorGeometry sg : sgl) {
    RectTile tile=(RectTile)sg;
    RenderInfo ri=(RenderInfo)tile.ri;
    if (isSectorInScreen(dc,sg.getSector())) {
      minElevation=Math.min(minElevation,ri.minElevation);
      maxElevation=Math.max(maxElevation,ri.maxElevation);
    }
 else {
      ri.vertices.rewind();
      for (int i=0; i < ri.vertices.limit(); i+=3) {
        Vec4 point=new Vec4(ri.vertices.get(),ri.vertices.get(),ri.vertices.get()).add3(ri.refCenter);
        if (isPointInScreen(dc,point)) {
          count++;
          minElevation=Math.min(minElevation,ri.positions.get(i + 2));
          maxElevation=Math.max(maxElevation,ri.positions.get(i + 2));
        }
      }
    }
  }
  if (minElevation == Double.MAX_VALUE)   minElevation=dc.getGlobe().getMinElevation();
  if (maxElevation == -Double.MAX_VALUE)   maxElevation=dc.getGlobe().getMaxElevation();
  return sgl;
}

Fixed version (ground truth):
@Override public SectorGeometryList tessellate(DrawContext dc){
  SectorGeometryList sgl=super.tessellate(dc);
  int count=0;
  minElevation=Double.MAX_VALUE;
  maxElevation=-Double.MAX_VALUE;
  for (  SectorGeometry sg : sgl) {
    RectTile tile=(RectTile)sg;
    RenderInfo ri=(RenderInfo)tile.ri;
    if (isSectorInScreen(dc,sg.getSector())) {
      minElevation=Math.min(minElevation,ri.minElevation);
      maxElevation=Math.max(maxElevation,ri.maxElevation);
    }
 else {
      ri.vertices.rewind();
      for (int i=0; i < ri.vertices.limit() / 3; i++) {
        Vec4 point=new Vec4(ri.vertices.get(),ri.vertices.get(),ri.vertices.get()).add3(ri.refCenter);
        if (isPointInScreen(dc,point)) {
          count++;
          minElevation=Math.min(minElevation,ri.elevations[i]);
          maxElevation=Math.max(maxElevation,ri.elevations[i]);
        }
      }
    }
  }
  if (minElevation == Double.MAX_VALUE)   minElevation=dc.getGlobe().getMinElevation();
  if (maxElevation == -Double.MAX_VALUE)   maxElevation=dc.getGlobe().getMaxElevation();
  return sgl;
}
Program: 11208
Project: 11208
Buggy source:
protected RenderInfo(int density,DoubleBuffer vertices,DoubleBuffer positions,double minElevation,double maxElevation,DoubleBuffer texCoords,Vec4 refCenter){
  super(density,vertices,texCoords,refCenter);
  this.positions=positions;
  this.vertices=vertices;
  this.minElevation=minElevation;
  this.maxElevation=maxElevation;
  this.refCenter=refCenter;
}

Fixed version (ground truth):
protected RenderInfo(int density,DoubleBuffer vertices,double[] elevations,double minElevation,double maxElevation,DoubleBuffer texCoords,Vec4 refCenter){
  super(density,vertices,texCoords,refCenter);
  this.elevations=elevations;
  this.vertices=vertices;
  this.minElevation=minElevation;
  this.maxElevation=maxElevation;
  this.refCenter=refCenter;
}
Program: 11210
Project: 11210
Buggy source:
private void refresh(){
  a1=params.accelerationIn;
  a3=params.accelerationOut;
  v1=params.velocityIn;
  v3=params.velocityOut;
  calculate();
  if (!isValid()) {
    a1=-a1;
    calculate();
    if (!isValid()) {
      a3=-a3;
      calculate();
      if (!isValid()) {
        a1=-a1;
        calculate();
        if (!isValid()) {
          throw new IllegalArgumentException();
        }
      }
    }
  }
  System.out.println();
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + t1 + "String_Node_Str"+ t2+ "String_Node_Str"+ t3);
  System.out.println("String_Node_Str" + v1 + "String_Node_Str"+ v2+ "String_Node_Str"+ v3);
  System.out.println("String_Node_Str" + d1 + "String_Node_Str"+ d2+ "String_Node_Str"+ d3+ "String_Node_Str"+ d3Calc+ "String_Node_Str");
  System.out.println("String_Node_Str" + a1 + "String_Node_Str"+ a3);
}

Fixed version (ground truth):
private void refresh(){
  a1=params.accelerationIn;
  a3=params.accelerationOut;
  v1=params.velocityIn;
  v3=params.velocityOut;
  calculate();
  if (!isValid()) {
    a1=-a1;
    calculate();
    if (!isValid()) {
      a3=-a3;
      calculate();
      if (!isValid()) {
        a1=-a1;
        calculate();
        if (!isValid()) {
          throw new IllegalArgumentException();
        }
      }
    }
  }
}
Program: 11211
Project: 11211
Buggy source:
public double getPercent(double time){
  if (time <= 0)   return 0;
  if (time >= getTime())   return 1;
  double a;
  double d;
  double u;
  double t;
  if (time < t1) {
    t=time;
    a=a1;
    d=0;
    u=v1;
  }
 else   if (time < t1 + t2) {
    t=time - t1;
    a=a2;
    d=d1;
    u=v2;
  }
 else {
    t=time - t1 - t2;
    a=a3;
    d=d1 + d2;
    u=v2;
  }
  d+=u * t + 0.5 * a * t* t;
  return Math.max(0,Math.min(1,d / getDistance()));
}

Fixed version (ground truth):
public double getPercent(double time){
  if (time <= 0)   return 0;
  if (time >= getTime())   return 1;
  if (getDistance() <= 0)   return 1;
  double a;
  double d;
  double u;
  double t;
  if (time < t1) {
    t=time;
    a=a1;
    d=0;
    u=v1;
  }
 else   if (time < t1 + t2) {
    t=time - t1;
    a=a2;
    d=d1;
    u=v2;
  }
 else {
    t=time - t1 - t2;
    a=a3;
    d=d1 + d2;
    u=v2;
  }
  d+=u * t + 0.5 * a * t* t;
  return Math.max(0,Math.min(1,d / getDistance()));
}
Program: 11212
Project: 11212
Buggy source:
public static void main(String[] args){
  Settings.initialize(SETTINGS_KEY);
  Configuration.setValue(AVKey.SCENE_CONTROLLER_CLASS_NAME,StereoSceneController.class.getName());
  Configuration.setValue(AVKey.VIEW_CLASS_NAME,StereoOrbitView.class.getName());
  Configuration.setValue(AVKey.LAYERS_CLASS_NAMES,"String_Node_Str");
  Configuration.setValue(AVKey.INITIAL_LATITUDE,Double.toString(Angle.fromDegreesLatitude(-27).degrees));
  Configuration.setValue(AVKey.INITIAL_LONGITUDE,Double.toString(Angle.fromDegreesLongitude(133.5).degrees));
  new Application();
}

Fixed version (ground truth):
public static void main(String[] args){
  Settings.initialize(SETTINGS_KEY);
  Configuration.setValue(AVKey.SCENE_CONTROLLER_CLASS_NAME,StereoSceneController.class.getName());
  Configuration.setValue(AVKey.VIEW_CLASS_NAME,StereoOrbitView.class.getName());
  Configuration.setValue(AVKey.LAYERS_CLASS_NAMES,"String_Node_Str");
  Configuration.setValue(AVKey.DATA_FILE_CACHE_CLASS_NAME,FixedBasicDataFileCache.class.getName());
  Configuration.setValue(AVKey.INITIAL_LATITUDE,Double.toString(Angle.fromDegreesLatitude(-27).degrees));
  Configuration.setValue(AVKey.INITIAL_LONGITUDE,Double.toString(Angle.fromDegreesLongitude(133.5).degrees));
  new Application();
}
Program: 11214
Project: 11214
Buggy source:
public void addPitch(Pitch pitch,double time,MotionParams motion){
  pitchs.put(time,new MotionAndObject<InterpolatablePitch>(new InterpolatablePitch(pitch),new Motion(motion)));
  pitchsDirty=true;
}

Fixed version (ground truth):
public void addPitch(Pitch pitch,double time,MotionParams motion){
  pitchs.put(time,new MotionAndObject<InterpolatablePitch>(new InterpolatablePitch(pitch),new Motion(motion)));
  dirty=true;
}
Program: 11215
Project: 11215
Buggy source:
public Zoom getZoom(double time){
  return new ValueGetter<Zoom,InterpolatableZoom>().getValue(time,zooms);
}

Fixed version (ground truth):
public Zoom getZoom(double time){
  refresh();
  return new ValueGetter<Zoom,InterpolatableZoom>().getValue(time,zooms);
}
Program: 11216
Project: 11216
Buggy source:
public LatLon getCenter(double time){
  return new ValueGetter<LatLon,InterpolatableLatLon>().getValue(time,centers);
}

Fixed version (ground truth):
public LatLon getCenter(double time){
  refresh();
  return new ValueGetter<LatLon,InterpolatableLatLon>().getValue(time,centers);
}
Program: 11217
Project: 11217
Buggy source:
public void addHeading(Heading heading,double time,MotionParams motion){
  headings.put(time,new MotionAndObject<InterpolatableHeading>(new InterpolatableHeading(heading),new Motion(motion)));
  headingsDirty=true;
}

Fixed version (ground truth):
public void addHeading(Heading heading,double time,MotionParams motion){
  headings.put(time,new MotionAndObject<InterpolatableHeading>(new InterpolatableHeading(heading),new Motion(motion)));
  dirty=true;
}
Program: 11218
Project: 11218
Buggy source:
public double getTime(){
  refreshIfDirty();
  return time;
}

Fixed version (ground truth):
public double getTime(){
  refresh();
  return time;
}
Program: 11219
Project: 11219
Buggy source:
public Pitch getPitch(double time){
  return new ValueGetter<Pitch,InterpolatablePitch>().getValue(time,pitchs);
}

Fixed version (ground truth):
public Pitch getPitch(double time){
  refresh();
  return new ValueGetter<Pitch,InterpolatablePitch>().getValue(time,pitchs);
}
Program: 11220
Project: 11220
Buggy source:
public void addZoom(Zoom zoom,double time,MotionParams motion){
  zooms.put(time,new MotionAndObject<InterpolatableZoom>(new InterpolatableZoom(zoom),new Motion(motion)));
  zoomsDirty=true;
}

Fixed version (ground truth):
public void addZoom(Zoom zoom,double time,MotionParams motion){
  zooms.put(time,new MotionAndObject<InterpolatableZoom>(new InterpolatableZoom(zoom),new Motion(motion)));
  dirty=true;
}
Program: 11221
Project: 11221
Buggy source:
public Heading getHeading(double time){
  return new ValueGetter<Heading,InterpolatableHeading>().getValue(time,headings);
}

Fixed version (ground truth):
public Heading getHeading(double time){
  refresh();
  return new ValueGetter<Heading,InterpolatableHeading>().getValue(time,headings);
}
Program: 11222
Project: 11222
Buggy source:
public void addCenter(LatLon center,LatLon in,LatLon out,double time,MotionParams motion){
  LatLonBezier llb=new LatLonBezier(center,in,out);
  centers.put(time,new MotionAndObject<InterpolatableLatLon>(new InterpolatableLatLon(llb),new Motion(motion)));
  centersDirty=true;
}

Fixed version (ground truth):
public void addCenter(LatLon center,LatLon in,LatLon out,double time,MotionParams motion){
  LatLonBezier llb=new LatLonBezier(center,in,out);
  centers.put(time,new MotionAndObject<InterpolatableLatLon>(new InterpolatableLatLon(llb),new Motion(motion)));
  dirty=true;
}
Program: 11223
Project: 11223
Buggy source:
private void refresh(){
  a1=params.accelerationIn;
  a3=params.accelerationOut;
  v1=v1forced ? forcev1 : params.velocityIn;
  v3=params.velocityOut;
  calculate();
  if (!isValid()) {
    a1=-a1;
    calculate();
    if (!isValid()) {
      a3=-a3;
      calculate();
      if (!isValid()) {
        a1=-a1;
        calculate();
        if (!isValid()) {
          throw new IllegalArgumentException();
        }
      }
    }
  }
  System.out.println();
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + t1 + "String_Node_Str"+ t2+ "String_Node_Str"+ t3);
  System.out.println("String_Node_Str" + v1 + "String_Node_Str"+ v2+ "String_Node_Str"+ v3);
  System.out.println("String_Node_Str" + d1 + "String_Node_Str"+ d2+ "String_Node_Str"+ d3+ "String_Node_Str"+ d3Calc+ "String_Node_Str");
  System.out.println("String_Node_Str" + a1 + "String_Node_Str"+ a3);
}

Fixed version (ground truth):
private void refresh(){
  a1=params.accelerationIn;
  a3=params.accelerationOut;
  v1=v1forced ? forcev1 : params.velocityIn;
  v3=params.velocityOut;
  calculate();
  if (!isValid()) {
    a1=-a1;
    calculate();
    if (!isValid()) {
      a3=-a3;
      calculate();
      if (!isValid()) {
        a1=-a1;
        calculate();
        if (!isValid()) {
          throw new IllegalArgumentException();
        }
      }
    }
  }
}
Program: 11224
Project: 11224
Buggy source:
private void animate(){
  final CameraPath path=createPath();
  System.out.println("String_Node_Str" + path.getTime());
  Thread thread=new Thread(new Runnable(){
    public void run(){
      View v=wwd.getSceneController().getView();
      if (!(v instanceof OrbitView))       return;
      OrbitView view=(OrbitView)v;
      boolean detectCollisions=view.isDetectCollisions();
      view.setDetectCollisions(false);
      double totalTime=path.getTime();
      double startTime=System.currentTimeMillis() / 1000d;
      double currentTime=0;
      while (currentTime <= totalTime) {
        currentTime=System.currentTimeMillis() / 1000d - startTime;
        LatLon center=path.getCenter(currentTime);
        Zoom zoom=path.getZoom(currentTime);
        Heading heading=path.getHeading(currentTime);
        Pitch pitch=path.getPitch(currentTime);
        view.setCenterPosition(new Position(center.getLatLon(),0));
        view.setZoom(zoom.toCameraZoom());
        view.setHeading(heading.getAngle());
        view.setPitch(pitch.getAngle());
        wwd.redrawNow();
      }
      view.setDetectCollisions(detectCollisions);
    }
  }
);
  thread.start();
}

Fixed version (ground truth):
private void animate(){
  final CameraPath path=createPath();
  Thread thread=new Thread(new Runnable(){
    public void run(){
      View v=wwd.getSceneController().getView();
      if (!(v instanceof OrbitView))       return;
      OrbitView view=(OrbitView)v;
      boolean detectCollisions=view.isDetectCollisions();
      view.setDetectCollisions(false);
      double totalTime=path.getTime();
      double startTime=System.currentTimeMillis() / 1000d;
      double currentTime=0;
      while (currentTime <= totalTime) {
        currentTime=System.currentTimeMillis() / 1000d - startTime;
        LatLon center=path.getCenter(currentTime);
        Zoom zoom=path.getZoom(currentTime);
        Heading heading=path.getHeading(currentTime);
        Pitch pitch=path.getPitch(currentTime);
        view.setCenterPosition(new Position(center.getLatLon(),0));
        view.setZoom(zoom.toCameraZoom());
        view.setHeading(heading.getAngle());
        view.setPitch(pitch.getAngle());
        wwd.redrawNow();
      }
      view.setDetectCollisions(detectCollisions);
    }
  }
);
  thread.start();
}
Program: 11225
Project: 11225
Buggy source:
private static CameraPath createPath(){
  LatLon l1=LatLon.fromDegrees(-27,133.5);
  LatLon l2=LatLon.fromDegrees(-21.0474,119.6494);
  Zoom zoom1=Zoom.fromCameraZoom(6378137);
  Zoom zoom2=Zoom.fromCameraZoom(559794);
  Heading heading1=Heading.fromDegrees(0);
  Heading heading2=Heading.fromDegrees(-30);
  Heading heading3=Heading.fromDegrees(180);
  Pitch pitch1=Pitch.fromDegrees(0);
  Pitch pitch2=Pitch.fromDegrees(80);
  Pitch pitch3=Pitch.fromDegrees(50);
  double time1=5;
  double time2=12;
  MotionParams centerMotion=new MotionParams(3,3,0,0);
  MotionParams zoomMotion=new MotionParams(0.5,0.5,0,0);
  MotionParams headingMotion1=new MotionParams(15,15,0,3,false,false);
  MotionParams headingMotion2=new MotionParams(15,15,0,0,true,false);
  MotionParams pitchMotion=new MotionParams(15,15,0,0);
  CameraPath path=new CameraPath(l1,l1,zoom1,heading1,pitch1);
  path.addCenter(l2,l2,null,time1,centerMotion);
  path.addZoom(zoom2,time1,zoomMotion);
  path.addHeading(heading2,time1,headingMotion1);
  path.addPitch(pitch2,time1,pitchMotion);
  path.addHeading(heading3,time2,headingMotion2);
  path.addPitch(pitch3,time2,pitchMotion);
  path.refresh();
  return path;
}

Fixed version (ground truth):
private static CameraPath createPath(){
  LatLon l1=LatLon.fromDegrees(-27,133.5);
  LatLon l2=LatLon.fromDegrees(-21.0474,119.6494);
  Zoom zoom1=Zoom.fromCameraZoom(6378137);
  Zoom zoom2=Zoom.fromCameraZoom(559794);
  Heading heading1=Heading.fromDegrees(0);
  Heading heading2=Heading.fromDegrees(-360);
  Pitch pitch1=Pitch.fromDegrees(0);
  Pitch pitch2=Pitch.fromDegrees(70);
  Pitch pitch3=Pitch.fromDegrees(50);
  double time1=4;
  double time3=12;
  MotionParams centerMotion=new MotionParams(4,4,0,0);
  MotionParams zoomMotion=new MotionParams(0.8,0.8,0,0);
  MotionParams headingMotion=new MotionParams(10,10,0,0);
  MotionParams pitchMotion=new MotionParams(20,20,0,0);
  CameraPath path=new CameraPath(l1,l1,zoom1,heading1,pitch1);
  path.addCenter(l2,l2,null,time1,centerMotion);
  path.addZoom(zoom2,time1,zoomMotion);
  path.addHeading(heading2,time3,headingMotion);
  path.addPitch(pitch2,time1,pitchMotion);
  path.addPitch(pitch3,time3,pitchMotion);
  path.refresh();
  return path;
}
Program: 11226
Project: 11226
Buggy source:
public void refresh(){
  if (dirty) {
    this.time=0;
    dirty=false;
    double time=new MapRefresher<InterpolatableLatLon>().refreshMap(centers);
    this.time=Math.max(this.time,time);
    time=new MapRefresher<InterpolatableZoom>().refreshMap(zooms);
    this.time=Math.max(this.time,time);
    time=new MapRefresher<InterpolatableHeading>().refreshMap(headings);
    this.time=Math.max(this.time,time);
    time=new MapRefresher<InterpolatablePitch>().refreshMap(pitchs);
    this.time=Math.max(this.time,time);
  }
}

Fixed version (ground truth):
public void refresh(){
  if (dirty) {
    this.time=0;
    dirty=false;
    try {
      double time=new MapRefresher<InterpolatableLatLon>().refreshMap(centers);
      this.time=Math.max(this.time,time);
      time=new MapRefresher<InterpolatableZoom>().refreshMap(zooms);
      this.time=Math.max(this.time,time);
      time=new MapRefresher<InterpolatableHeading>().refreshMap(headings);
      this.time=Math.max(this.time,time);
      time=new MapRefresher<InterpolatablePitch>().refreshMap(pitchs);
      this.time=Math.max(this.time,time);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
}
Program: 11227
Project: 11227
Buggy source:
private void calculateOthers(){
  if (params.ignoreOut) {
    v3=v2;
    t3=0;
    a3=0;
    d3=0;
    t1=(v2 - v1) / a1;
    t2=time - t1;
    d2=v2 * t2;
    d1=distance - d2;
    d3Calc=v2 * t3 + 0.5 * a3 * t3* t3;
  }
 else   if (params.ignoreIn) {
    v1=v2;
    a1=0;
    t1=0;
    d1=0;
    t3=(v3 - v2) / a3;
    t2=time - t3;
    d2=v2 * t2;
    d3=distance - d2;
    d3Calc=v2 * t3 + 0.5 * a3 * t3* t3;
  }
 else {
    t1=(v2 - v1) / a1;
    t3=(v3 - v1 - a1 * t1) / a3;
    t2=time - t3 - t1;
    d1=v1 * t1 + 0.5 * a1 * t1* t1;
    d2=v2 * t2;
    d3=distance - d1 - d2;
    d3Calc=v2 * t3 + 0.5 * a3 * t3* t3;
  }
}

Fixed version (ground truth):
private void calculateOthers(){
  if (params.ignoreOut) {
    v3=v2;
    a3=0;
    t1=(v2 - v1) / a1;
    t3=0;
    t2=time - t1;
    d2=v2 * t2;
    d1=distance - d2;
    d3=0;
  }
 else   if (params.ignoreIn) {
    v1=v2;
    a1=0;
    t1=0;
    t3=(v3 - v2) / a3;
    t2=time - t3;
    d1=0;
    d2=v2 * t2;
    d3=distance - d2;
  }
 else {
    t1=(v2 - v1) / a1;
    t3=(v3 - v1 - a1 * t1) / a3;
    t2=time - t3 - t1;
    d1=v1 * t1 + 0.5 * a1 * t1* t1;
    d2=v2 * t2;
    d3=distance - d1 - d2;
  }
  d3Calc=v2 * t3 + 0.5 * a3 * t3* t3;
  System.out.println();
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + t1 + "String_Node_Str"+ t2+ "String_Node_Str"+ t3);
  System.out.println("String_Node_Str" + v1 + "String_Node_Str"+ v2+ "String_Node_Str"+ v3);
  System.out.println("String_Node_Str" + d1 + "String_Node_Str"+ d2+ "String_Node_Str"+ d3+ "String_Node_Str"+ d3Calc+ "String_Node_Str");
  System.out.println("String_Node_Str" + a1 + "String_Node_Str"+ a3);
}
Program: 11228
Project: 11228
Buggy source:
private void refresh(){
  a1=params.accelerationIn;
  a3=params.accelerationOut;
  v1=v1forced ? forcev1 : params.velocityIn;
  v3=params.velocityOut;
  calculate();
  if (!isValid()) {
    a1=-a1;
    calculate();
    if (!isValid()) {
      a3=-a3;
      calculate();
      if (!isValid()) {
        a1=-a1;
        calculate();
        if (!isValid()) {
          throw new IllegalArgumentException();
        }
      }
    }
  }
}

Fixed version (ground truth):
private void refresh(){
  a1=params.accelerationIn;
  a3=params.accelerationOut;
  v1=v1forced ? forcev1 : params.velocityIn;
  v3=params.velocityOut;
  calculate();
  if (!isValid()) {
    a1=-a1;
    calculate();
    if (!isValid()) {
      a3=-a3;
      calculate();
      if (!isValid()) {
        a1=-a1;
        calculate();
        if (!isValid()) {
          throw new IllegalArgumentException();
        }
      }
    }
  }
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
}
Program: 11229
Project: 11229
Buggy source:
private void calculate(){
  double a, b, c;
  if (params.ignoreOut) {
    a=1;
    b=2 * (-v1 - time * a1);
    c=2 * a1 * distance + v1 * v1;
  }
 else   if (params.ignoreIn) {
    a=-1;
    b=2 * (v3 - time * a3);
    c=2 * a3 * distance - v3 * v3;
  }
 else {
    a=a1 - a3;
    b=2 * (a1 * a3 * time + a3 * v1 - a1 * v3);
    c=a1 * v3 * v3 - a3 * v1 * v1 - 2 * a1 * a3* distance;
  }
  calculateV2(a,b,c,false);
  calculateOthers();
  if (!isValid()) {
    calculateV2(a,b,c,true);
    calculateOthers();
  }
}

Fixed version (ground truth):
private void calculate(){
  double a, b, c;
  if (params.ignoreOut) {
    a=1;
    b=2 * (-v1 - time * a1);
    c=2 * a1 * distance + v1 * v1;
  }
 else   if (params.ignoreIn) {
    a=-1;
    b=2 * (v3 - time * a3);
    c=2 * a3 * distance - v3 * v3;
  }
 else {
    a=a1 - a3;
    b=2 * (a1 * a3 * time + a3 * v1 - a1 * v3);
    c=a1 * v3 * v3 - a3 * v1 * v1 - 2 * a1 * a3* distance;
  }
  if (a == 0) {
    v2=(2 * a1 * a1* distance + a1 * v1 * v1 - a1 * v3 * v3) / (2 * (a1 * a1 * time + a1 * v1 - a1 * v3));
    calculateOthers();
  }
 else {
    v2=quadratic(a,b,c,false);
    calculateOthers();
    if (!isValid()) {
      v2=quadratic(a,b,c,true);
      calculateOthers();
    }
  }
}
Program: 11230
Project: 11230
Buggy source:
private Heading(double degrees){
  while (degrees > 180d) {
    degrees-=360d;
  }
  while (degrees <= -180d) {
    degrees+=360d;
  }
  this.degrees=degrees;
}

Fixed version (ground truth):
private Heading(double degrees){
  this.degrees=degrees;
}
Program: 11231
Project: 11231
Buggy source:
public Angle getAngle(){
  return Angle.fromDegrees(degrees);
}

Fixed version (ground truth):
public Angle getAngle(){
  return Angle.fromDegrees(fixDegrees(degrees));
}
Program: 11232
Project: 11232
Buggy source:
/** 
 * Gets a   {@link ScriptInfo} for the given file, creating a new one if noneare registered with the service.
 */
private ScriptInfo getOrCreate(final File file){
  final ScriptInfo info=scripts().get(file);
  if (info != null)   return info;
  return new ScriptInfo(getContext(),file);
}

Fixed version (ground truth):
/** 
 * Gets a   {@link ScriptInfo} for the given file, creating a new one if noneare registered with the service.
 */
private ScriptInfo getOrCreate(final File file){
  final ScriptInfo info=scripts().get(file.getAbsolutePath());
  if (info != null)   return info;
  return new ScriptInfo(getContext(),file);
}
Program: 11233
Project: 11233
Buggy source:
/** 
 * @deprecated Use {@link Types#returnType} instead. 
 */
@Deprecated public static Type getMethodReturnType(final Method method,final Class<?> type){
  return Types.methodReturnType(method,type);
}

Fixed version (ground truth):
/** 
 * @deprecated Use {@link Types#methodReturnType} instead. 
 */
@Deprecated public static Type getMethodReturnType(final Method method,final Class<?> type){
  return Types.methodReturnType(method,type);
}
Program: 11234
Project: 11234
Buggy source:
/** 
 * @deprecated Use {@link Types#returnType} and {@link Types#raws} instead.
 */
@Deprecated public static List<Class<?>> getMethodReturnClasses(final Method method,final Class<?> type){
  return Types.raws(Types.methodReturnType(method,type));
}

Fixed version (ground truth):
/** 
 * @deprecated Use {@link Types#methodReturnType} and {@link Types#raws} instead.
 */
@Deprecated public static List<Class<?>> getMethodReturnClasses(final Method method,final Class<?> type){
  return Types.raws(Types.methodReturnType(method,type));
}
Program: 11235
Project: 11235
Buggy source:
/** 
 * Returns the primitive   {@link Class} closest to the given type.<p> Specifically, the following type conversions are done: <ul> <li>Boolean.class becomes boolean.class</li> <li>Byte.class becomes byte.class</li> <li>Character.class becomes char.class</li> <li>Double.class becomes double.class</li> <li>Float.class becomes float.class</li> <li>Integer.class becomes int.class</li> <li>Long.class becomes long.class</li> <li>Short.class becomes short.class</li> <li>Void.class becomes void.class</li> </ul> All other types are unchanged. </p>
 */
public static <T>Class<T> unbox(final Class<T> type){
  final Class<?> destType;
  if (type == Boolean.class)   destType=boolean.class;
 else   if (type == Byte.class)   destType=byte.class;
 else   if (type == Character.class)   destType=char.class;
 else   if (type == Double.class)   destType=double.class;
 else   if (type == Float.class)   destType=float.class;
 else   if (type == Integer.class)   destType=int.class;
 else   if (type == Long.class)   destType=long.class;
 else   if (type == Short.class)   destType=short.class;
 else   if (type == Void.class)   destType=void.class;
 else   destType=type;
  @SuppressWarnings("String_Node_Str") final Class<T> result=(Class<T>)destType;
  return result;
}

Fixed version (ground truth):
/** 
 * Returns the primitive   {@link Class} closest to the given type.<p> Specifically, the following type conversions are done: </p> <ul> <li>Boolean.class becomes boolean.class</li> <li>Byte.class becomes byte.class</li> <li>Character.class becomes char.class</li> <li>Double.class becomes double.class</li> <li>Float.class becomes float.class</li> <li>Integer.class becomes int.class</li> <li>Long.class becomes long.class</li> <li>Short.class becomes short.class</li> <li>Void.class becomes void.class</li> </ul> <p> All other types are unchanged. </p>
 */
public static <T>Class<T> unbox(final Class<T> type){
  final Class<?> destType;
  if (type == Boolean.class)   destType=boolean.class;
 else   if (type == Byte.class)   destType=byte.class;
 else   if (type == Character.class)   destType=char.class;
 else   if (type == Double.class)   destType=double.class;
 else   if (type == Float.class)   destType=float.class;
 else   if (type == Integer.class)   destType=int.class;
 else   if (type == Long.class)   destType=long.class;
 else   if (type == Short.class)   destType=short.class;
 else   if (type == Void.class)   destType=void.class;
 else   destType=type;
  @SuppressWarnings("String_Node_Str") final Class<T> result=(Class<T>)destType;
  return result;
}