nus-yam/ex-repair huggingface dataset:
Program: 44428
Project: 44428
Buggy source:
/** 
 * Deploy this resource.
 * @param resource
 * @param options
 */
public void deployResource(Resource resource,int options){
  Resolver resolver=repositoryAdmin.resolver();
  resolver.add(resource);
  int resolveAttempt=5;
  while (resolveAttempt-- > 0) {
    try {
      if (resolver.resolve(options)) {
        resolver.deploy(options);
        break;
      }
 else {
        Reason[] reqs=resolver.getUnsatisfiedRequirements();
        for (int i=0; i < reqs.length; i++) {
          ClassServiceUtility.log(bundleContext,LogService.LOG_ERROR,"String_Node_Str" + reqs[i]);
        }
        break;
      }
    }
 catch (    IllegalStateException e) {
      if (resolveAttempt == 0)       e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
/** 
 * Deploy this resource.
 * @param resource
 * @param options
 */
public void deployResource(Resource resource,int options){
  String name=resource.getSymbolicName() + "String_Node_Str" + resource.getVersion();
  Lock lock=this.getLock(name);
  try {
    boolean acquired=lock.tryLock();
    if (acquired) {
      try {
        Resolver resolver=repositoryAdmin.resolver();
        resolver.add(resource);
        int resolveAttempt=5;
        while (resolveAttempt-- > 0) {
          try {
            if (resolver.resolve(options)) {
              resolver.deploy(options);
              break;
            }
 else {
              Reason[] reqs=resolver.getUnsatisfiedRequirements();
              for (int i=0; i < reqs.length; i++) {
                ClassServiceUtility.log(bundleContext,LogService.LOG_ERROR,"String_Node_Str" + reqs[i]);
              }
              break;
            }
          }
 catch (          IllegalStateException e) {
            if (resolveAttempt == 0)             e.printStackTrace();
          }
        }
      }
  finally {
        lock.unlock();
      }
    }
 else {
      acquired=lock.tryLock(secondsToWait,TimeUnit.SECONDS);
      if (acquired) {
        try {
        }
  finally {
          lock.unlock();
        }
      }
 else {
      }
    }
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
  }
 finally {
    this.removeLock(name);
  }
}
Program: 44429
Project: 44429
Buggy source:
public java.util.Date getDob(){
  return this._dob;
}

Fixed version (ground truth):
public VarioDate getDob(){
  return this._dob;
}
Program: 44430
Project: 44430
Buggy source:
public void setDob(java.util.Date dob){
  this._dob=dob;
}

Fixed version (ground truth):
public void setDob(VarioDate dob){
  this._dob=dob;
}
Program: 44432
Project: 44432
Buggy source:
public static void main(String[] args) throws Exception {
  if (args.length == 0)   Util.fatal(HTMLDocumentGenerator.class,"String_Node_Str");
  RNGMetadataAPI app=RNGMetadataAPI.createInstance(args[0]);
  HTMLDocumentGenerator gener=new HTMLDocumentGenerator("String_Node_Str");
  gener.HTMLHeader("String_Node_Str");
  NodeList nodes=app.findAllXMLNodes("String_Node_Str");
  for (int i=0; i < nodes.getLength(); i++) {
    MetaData data=app.createMetaDataObject(nodes.item(i),true);
    gener.generate(data);
  }
  gener.HTMLEnd();
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  if (args.length < 2)   Util.fatal(HTMLDocumentGenerator.class,"String_Node_Str");
  List<String> argsStr=new ArrayList<String>();
  for (int i=0; i < args.length - 1; i++) {
    System.err.println(args[i]);
    argsStr.add(args[i]);
  }
  RNGMetadataAPI app=RNGMetadataAPI.createInstance(argsStr.toArray(new String[args.length - 1]));
  HTMLDocumentGenerator gener=new HTMLDocumentGenerator(args[args.length - 1]);
  gener.HTMLHeader("String_Node_Str");
  List<org.w3c.dom.Node> nodes=app.findAllXMLNodesOrDie("String_Node_Str");
  for (int i=0; i < nodes.size(); i++) {
    MetaData data=app.createMetaDataObject(nodes.get(i),true);
    gener.generate(data);
  }
  gener.HTMLEnd();
}
Program: 44434
Project: 44434
Buggy source:
public Placer(GameTile placing,Glyphs.Play glyph){
  _placing=placing;
  _glyph=glyph;
  Rectangle tbounds=new Rectangle(Media.TERRAIN_SIZE);
  for (  Location ploc : _ctrl.logic.computeLegalPlays(placing)) {
    final Glyphs.Target target=new Glyphs.Target(Atlantis.media.getTargetTile(),ploc);
    target.layer.setZOrder(-1);
    tiles.add(target.layer);
    _targets.add(target);
    Atlantis.input.register(target.layer,tbounds,new Input.Action(){
      public void onTrigger(){
        activateTarget(target);
      }
    }
);
  }
}

Fixed version (ground truth):
public Placer(GameTile placing,Glyphs.Play glyph){
  _placing=placing;
  _glyph=glyph;
  Rectangle tbounds=new Rectangle(Media.TERRAIN_SIZE);
  for (  Location ploc : _ctrl.logic.computeLegalPlays(placing)) {
    final Glyphs.Target target=new Glyphs.Target(Atlantis.media.getTargetTile(),ploc);
    target.layer.setDepth(-1);
    tiles.add(target.layer);
    _targets.add(target);
    Atlantis.input.register(target.layer,tbounds,new Input.Action(){
      public void onTrigger(){
        activateTarget(target);
      }
    }
);
  }
}
Program: 44435
Project: 44435
Buggy source:
protected void showPiecenScoreAnimation(Piecen p,int score){
  Glyphs.Play pglyph=_pglyphs.get(p.loc);
  final TextGlyph sglyph=TextGlyph.forText("String_Node_Str" + score,SCORE_FORMAT);
  float swidth=sglyph.layer.canvas().width(), sheight=sglyph.layer.canvas().height();
  sglyph.layer.setOrigin(swidth / 2f,sheight);
  tiles.add(sglyph.layer);
  Feature f=pglyph.tile.terrain.features[p.featureIdx];
  Point start=Input.layerToParent(pglyph.layer,tiles,f.piecenSpot,new Point());
  Atlantis.anim.tweenXY(sglyph.layer).in(2000f).easeIn().from(start.x,start.y).to(start.x,start.y - sheight).then().action(new Runnable(){
    public void run(){
      sglyph.layer.destroy();
    }
  }
);
  Atlantis.anim.tweenAlpha(sglyph.layer).in(2000f).easeIn().from(1f).to(0f);
}

Fixed version (ground truth):
protected void showPiecenScoreAnimation(Piecen p,int score){
  Glyphs.Play pglyph=_pglyphs.get(p.loc);
  final TextGlyph sglyph=TextGlyph.forText("String_Node_Str" + score,SCORE_FORMAT.withTextColor(Media.PIECEN_COLORS[p.ownerIdx]));
  float swidth=sglyph.layer.canvas().width(), sheight=sglyph.layer.canvas().height();
  sglyph.layer.setOrigin(swidth / 2f,sheight);
  tiles.add(sglyph.layer);
  Feature f=pglyph.tile.terrain.features[p.featureIdx];
  Point start=Input.layerToParent(pglyph.layer,tiles,f.piecenSpot,new Point());
  Atlantis.anim.tweenXY(sglyph.layer).in(2000f).easeOut().from(start.x,start.y).to(start.x,start.y - sheight).then().action(new Runnable(){
    public void run(){
      sglyph.layer.destroy();
    }
  }
);
  Atlantis.anim.tweenAlpha(sglyph.layer).in(2000f).easeOut().from(1f).to(0f);
}
Program: 44436
Project: 44436
Buggy source:
public Board(){
  float width=graphics().width(), height=graphics().height();
  SurfaceLayer bground=graphics().createSurfaceLayer((int)width,(int)height);
  bground.surface().setFillPattern(graphics().createPattern(Atlantis.media.getTableImage()));
  bground.surface().fillRect(0,0,width,height);
  bground.setZOrder(-1);
  tiles.setZOrder(0);
  scores.layer.setZOrder(+1);
  flight.setZOrder(+2);
  graphics().rootLayer().add(bground);
  graphics().rootLayer().add(tiles);
  graphics().rootLayer().add(scores.layer);
  graphics().rootLayer().add(flight);
  SurfaceLayer grid=graphics().createSurfaceLayer((int)width,(int)height);
  grid.surface().drawLine(0f,height / 2,width,height / 2,1f);
  grid.surface().drawLine(width / 2,0f,width / 2,height,1f);
  grid.setZOrder(+3);
  graphics().rootLayer().add(grid);
}

Fixed version (ground truth):
public Board(){
  float width=graphics().width(), height=graphics().height();
  SurfaceLayer bground=graphics().createSurfaceLayer((int)width,(int)height);
  bground.surface().setFillPattern(graphics().createPattern(Atlantis.media.getTableImage()));
  bground.surface().fillRect(0,0,width,height);
  bground.setDepth(-1);
  tiles.setDepth(0);
  scores.layer.setDepth(+1);
  flight.setDepth(+2);
  graphics().rootLayer().add(bground);
  graphics().rootLayer().add(tiles);
  graphics().rootLayer().add(scores.layer);
  graphics().rootLayer().add(flight);
  SurfaceLayer grid=graphics().createSurfaceLayer((int)width,(int)height);
  grid.surface().drawLine(0f,height / 2,width,height / 2,1f);
  grid.surface().drawLine(width / 2,0f,width / 2,height,1f);
  grid.setDepth(+3);
  graphics().rootLayer().add(grid);
}
Program: 44438
Project: 44438
Buggy source:
protected void commitPlacement(Piecen piecen){
  _ctrl.place(new Placement(_placing,_glyph.getOrient(),_active.loc),piecen);
  restoreZoom();
}

Fixed version (ground truth):
protected void commitPlacement(Feature f){
  Placement play=new Placement(_placing,_glyph.getOrient(),_active.loc);
  Piecen piecen=(f == null) ? null : new Piecen(_gobj.turnHolder.get(),_active.loc,play.getFeatureIndex(f));
  _ctrl.place(play,piecen);
  restoreZoom();
}
Program: 44440
Project: 44440
Buggy source:
public void init(){
  graphics().setSize(1024,768);
  Log.setImpl(new Log.Impl(){
    public void debug(    String message,    Throwable t){
      if (t != null)       log().debug(message,t);
 else       log().debug(message);
    }
    public void info(    String message,    Throwable t){
      if (t != null)       log().info(message,t);
 else       log().info(message);
    }
    public void warning(    String message,    Throwable t){
      if (t != null)       log().warn(message,t);
 else       log().warn(message);
    }
  }
);
  Atlantis.media.init();
  _bground=graphics().createSurfaceLayer(graphics().width(),graphics().height());
  _bground.surface().setFillPattern(graphics().createPattern(Atlantis.media.getTableImage()));
  graphics().rootLayer().add(_bground);
  Board board=new Board();
  graphics().rootLayer().add(board.tiles);
  Scoreboard scores=new Scoreboard();
  scores.init(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"});
  graphics().rootLayer().add(scores.layer);
  float width=graphics().width(), height=graphics().height();
  SurfaceLayer grid=graphics().createSurfaceLayer((int)width,(int)height);
  grid.surface().drawLine(0f,height / 2,width,height / 2,1f);
  grid.surface().drawLine(width / 2,0f,width / 2,height,1f);
  graphics().rootLayer().add(grid);
  GameController ctrl=new GameController(board,scores);
  ctrl.startGame();
}

Fixed version (ground truth):
public void init(){
  graphics().setSize(1024,768);
  Log.setImpl(new Log.Impl(){
    public void debug(    String message,    Throwable t){
      if (t != null)       log().debug(message,t);
 else       log().debug(message);
    }
    public void info(    String message,    Throwable t){
      if (t != null)       log().info(message,t);
 else       log().info(message);
    }
    public void warning(    String message,    Throwable t){
      if (t != null)       log().warn(message,t);
 else       log().warn(message);
    }
  }
);
  Atlantis.media.init();
  _bground=graphics().createSurfaceLayer(graphics().width(),graphics().height());
  _bground.surface().setFillPattern(graphics().createPattern(Atlantis.media.getTableImage()));
  graphics().rootLayer().add(_bground);
  Board board=new Board();
  graphics().rootLayer().add(board.tiles);
  Scoreboard scores=new Scoreboard();
  scores.init(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"});
  graphics().rootLayer().add(scores.layer);
  graphics().rootLayer().add(board.flight);
  float width=graphics().width(), height=graphics().height();
  SurfaceLayer grid=graphics().createSurfaceLayer((int)width,(int)height);
  grid.surface().drawLine(0f,height / 2,width,height / 2,1f);
  grid.surface().drawLine(width / 2,0f,width / 2,height,1f);
  graphics().rootLayer().add(grid);
  GameController ctrl=new GameController(board,scores);
  ctrl.startGame();
}
Program: 44441
Project: 44441
Buggy source:
/** 
 * Loads up our resources and performs other one-time initialization tasks.
 */
public void init(GameController ctrl){
  _ctrl=ctrl;
  Rectangle sbounds=new Rectangle(0,0,graphics().width(),graphics().height());
  Atlantis.input.register(sbounds,new Pointer.Listener(){
    @Override public void onPointerStart(    float x,    float y){
      _drag=new Point(x,y);
    }
    @Override public void onPointerDrag(    float x,    float y){
      if (_drag != null) {
        tiles.setTranslation(tiles.transform().tx() + (x - _drag.x),tiles.transform().ty() + (y - _drag.y));
        _drag.set(x,y);
      }
    }
    @Override public void onPointerEnd(    float x,    float y){
      _drag=null;
    }
    protected Point _drag;
  }
);
  _origin=sbounds.getCenter();
  tiles.setTranslation(_origin.x,_origin.y);
}

Fixed version (ground truth):
/** 
 * Loads up our resources and performs other one-time initialization tasks.
 */
public void init(GameController ctrl){
  _ctrl=ctrl;
  Rectangle sbounds=new Rectangle(0,0,graphics().width(),graphics().height());
  Atlantis.input.register(sbounds,new Pointer.Listener(){
    @Override public void onPointerStart(    float x,    float y){
      _drag=new Point(x,y);
    }
    @Override public void onPointerDrag(    float x,    float y){
      if (_drag != null) {
        float ntx=tiles.transform().tx() + (x - _drag.x);
        float nty=tiles.transform().ty() + (y - _drag.y);
        tiles.setTranslation(ntx,nty);
        flight.setTranslation(ntx,nty);
        _drag.set(x,y);
      }
    }
    @Override public void onPointerEnd(    float x,    float y){
      _drag=null;
    }
    protected Point _drag;
  }
);
  _origin=sbounds.getCenter();
  tiles.setTranslation(_origin.x,_origin.y);
  flight.setTranslation(_origin.x,_origin.y);
}
Program: 44442
Project: 44442
Buggy source:
@Override public void onPointerDrag(float x,float y){
  if (_drag != null) {
    tiles.setTranslation(tiles.transform().tx() + (x - _drag.x),tiles.transform().ty() + (y - _drag.y));
    _drag.set(x,y);
  }
}

Fixed version (ground truth):
@Override public void onPointerDrag(float x,float y){
  if (_drag != null) {
    float ntx=tiles.transform().tx() + (x - _drag.x);
    float nty=tiles.transform().ty() + (y - _drag.y);
    tiles.setTranslation(ntx,nty);
    flight.setTranslation(ntx,nty);
    _drag.set(x,y);
  }
}
Program: 44443
Project: 44443
Buggy source:
public void run(){
  _ctrls.layer.setVisible(true);
  _placep.setVisible(true);
}

Fixed version (ground truth):
public void run(){
  if (_glyph.layer.parent() == flight) {
    flight.remove(_glyph.layer);
    tiles.add(0,_glyph.layer);
  }
  _ctrls.layer.setVisible(true);
  _placep.setVisible(true);
}
Program: 44445
Project: 44445
Buggy source:
public void setNextTile(Glyphs.Play tile){
  _nextLabel.layer.setVisible(tile != null);
  tile.layer.setTranslation(WIDTH / 2,_nextTileY + Media.TERRAIN_HEIGHT / 2);
  layer.add(tile.layer);
  System.out.println("String_Node_Str" + tile.layer.transform().tx() + "String_Node_Str"+ tile.layer.transform().ty());
}

Fixed version (ground truth):
public void setNextTile(Glyphs.Play tile){
  _nextLabel.layer.setVisible(tile != null);
  tile.layer.setTranslation(WIDTH / 2,_nextTileY + Media.TERRAIN_HEIGHT / 2);
  layer.add(tile.layer);
}
Program: 44446
Project: 44446
Buggy source:
/** 
 * Computes and returns the set of board positions where the supplied tile can be legally played, given the supplied preexisting plays.
 */
public static Set<Location> computeLegalPlays(Placements plays,GameTile tile){
  Set<Location> locs=Sets.newHashSet();
  for (  Placement play : plays) {
    locs.addAll(play.loc.neighbors());
  }
  for (  Placement play : plays) {
    locs.remove(play.loc);
  }
  OUTER:   for (Iterator<Location> iter=locs.iterator(); iter.hasNext(); ) {
    Location pos=iter.next();
    ORIENT:     for (    Orient orient : Orient.values()) {
      Placement play=new Placement(tile,orient,pos);
      for (      Location npos : pos.neighbors()) {
        Placement neighbor=plays.get(npos);
        if (neighbor != null && !tilesMatch(neighbor,play)) {
          continue ORIENT;
        }
      }
      continue OUTER;
    }
  }
  return locs;
}

Fixed version (ground truth):
/** 
 * Computes and returns the set of board positions where the supplied tile can be legally played, given the supplied preexisting plays.
 */
public static Set<Location> computeLegalPlays(Placements plays,GameTile tile){
  Set<Location> locs=Sets.newHashSet();
  for (  Placement play : plays) {
    locs.addAll(play.loc.neighbors());
  }
  for (  Placement play : plays) {
    locs.remove(play.loc);
  }
  OUTER:   for (Iterator<Location> iter=locs.iterator(); iter.hasNext(); ) {
    Location pos=iter.next();
    ORIENT:     for (    Orient orient : Orient.values()) {
      Placement play=new Placement(tile,orient,pos);
      for (      Location npos : pos.neighbors()) {
        Placement neighbor=plays.get(npos);
        if (neighbor != null && !tilesMatch(neighbor,play)) {
          continue ORIENT;
        }
      }
      continue OUTER;
    }
    iter.remove();
  }
  return locs;
}
Program: 44447
Project: 44447
Buggy source:
public void setLocation(int x,int y){
  layer.setTranslation((x + 0.5f) * AtlantisTiles.TERRAIN_WIDTH,(y + 0.5f) * AtlantisTiles.TERRAIN_HEIGHT + hhei);
}

Fixed version (ground truth):
public void setLocation(int x,int y){
  layer.setTranslation((x + 0.5f) * AtlantisTiles.TERRAIN_WIDTH,(y + 0.5f) * AtlantisTiles.TERRAIN_HEIGHT);
}
Program: 44448
Project: 44448
Buggy source:
public void setPlacing(Terrain terrain,boolean hasShield){
  if (_placingGlyph != null) {
    _placingGlyph.layer.destroy();
  }
  _placing=play;
  _placingGlyph=new PlayGlyph(terrain,hasShield);
  _placingGlyph.layer.setAlpha(0.5f);
  layer.add(_placingGlyph.layer);
}

Fixed version (ground truth):
public void setPlacing(GameTile tile){
  if (_placingGlyph != null) {
    _placingGlyph.layer.destroy();
  }
  _placing=tile;
  _placingGlyph=new PlayGlyph(tile);
  _placingGlyph.layer.setAlpha(0.5f);
  layer.add(_placingGlyph.layer);
}
Program: 44449
Project: 44449
Buggy source:
public PlayGlyph(Terrain terrain,boolean hasShield){
  float hwid=AtlantisTiles.TERRAIN_WIDTH / 2, hhei=AtlantisTiles.TERRAIN_HEIGHT / 2;
  layer=graphics().createGroupLayer();
  layer.setOrigin(hwid,hhei);
  layer.add(Atlantis.tiles.getTerrainTile(terrain.tileIdx));
}

Fixed version (ground truth):
public PlayGlyph(GameTile tile){
  float hwid=AtlantisTiles.TERRAIN_WIDTH / 2, hhei=AtlantisTiles.TERRAIN_HEIGHT / 2;
  layer=graphics().createGroupLayer();
  layer.setOrigin(hwid,hhei);
  layer.add(Atlantis.tiles.getTerrainTile(tile.terrain.tileIdx));
}
Program: 44450
Project: 44450
Buggy source:
public void startGame(){
  Set<Placement> plays=new HashSet<Placement>();
  plays.add(new Placement(Terrain.CITY_ONE_ROAD_STRAIGHT,false,Orient.NORTH,0,0));
  _board.reset(plays);
}

Fixed version (ground truth):
public void startGame(){
  Set<Placement> plays=new HashSet<Placement>();
  plays.add(new Placement(GameTile.STARTER,Orient.NORTH,0,0));
  _board.reset(plays);
}
Program: 44451
Project: 44451
Buggy source:
/** 
 * Creates a placement with the supplied configuration.
 */
public Placement(Terrain tile,boolean hasShield,Orient orient,int x,int y){
  this.tile=tile;
  this.hasShield=hasShield;
  this.orient=orient;
  this.x=x;
  this.y=y;
  this.claims=new int[tile.features.length];
}

Fixed version (ground truth):
/** 
 * Creates a placement with the supplied configuration.
 */
public Placement(GameTile tile,Orient orient,int x,int y){
  this.tile=tile;
  this.orient=orient;
  this.x=x;
  this.y=y;
  this.claims=new int[tile.features().length];
}
Program: 44452
Project: 44452
Buggy source:
@Override public String toString(){
  return Objects.toStringHelper(this).add("String_Node_Str",tile).add("String_Node_Str",hasShield).add("String_Node_Str",orient).add("String_Node_Str",Points.pointToString(x,y)).add("String_Node_Str",claims).add("String_Node_Str",piecen).toString();
}

Fixed version (ground truth):
@Override public String toString(){
  return Objects.toStringHelper(this).add("String_Node_Str",tile).add("String_Node_Str",orient).add("String_Node_Str",Points.pointToString(x,y)).add("String_Node_Str",claims).add("String_Node_Str",piecen).toString();
}
Program: 44453
Project: 44453
Buggy source:
/** 
 * Returns the index of the feature that contains the supplied mouse coordinates (which will have been translated relative to the tile's origin).
 * @return the index of the feature that contains the mouse coordinates. Some feature shouldalways contain the mouse.
 */
public int getFeatureIndex(int mouseX,int mouseY){
  for (int ii=tile.features.length - 1; ii >= 0; ii--) {
    if (tile.features[ii].contains(mouseX,mouseY,orient)) {
      return ii;
    }
  }
  Log.warning("String_Node_Str","String_Node_Str",this,"String_Node_Str",mouseX,"String_Node_Str",mouseY);
  return 0;
}

Fixed version (ground truth):
/** 
 * Returns the index of the feature that contains the supplied mouse coordinates (which will have been translated relative to the tile's origin).
 * @return the index of the feature that contains the mouse coordinates. Some feature shouldalways contain the mouse.
 */
public int getFeatureIndex(int mouseX,int mouseY){
  Feature[] features=tile.features();
  for (int ii=features.length - 1; ii >= 0; ii--) {
    if (features[ii].contains(mouseX,mouseY,orient)) {
      return ii;
    }
  }
  Log.warning("String_Node_Str","String_Node_Str",this,"String_Node_Str",mouseX,"String_Node_Str",mouseY);
  return 0;
}
Program: 44455
Project: 44455
Buggy source:
public static com.vividsolutions.jts.geom.Point getPoint(WayPointType startPoint,CoordinateReferenceSystem targetCRS){
  PositionType ptype=(PositionType)startPoint.getLocation().getValue();
  PointType pointType=ptype.getPoint();
  DirectPositionType ctype=pointType.getPos();
  CoordinateReferenceSystem sourceCRS=getSRS(startPoint);
  LOG.trace(sourceCRS.toWKT());
  LOG.trace("String_Node_Str" + ctype.getValue().get(0) + "String_Node_Str"+ ctype.getValue().get(1)+ "String_Node_Str");
  com.vividsolutions.jts.geom.Point p=geomFact.createPoint(new Coordinate(ctype.getValue().get(0),ctype.getValue().get(1)));
  if (targetCRS != null && !sourceCRS.equals(targetCRS)) {
    try {
      MathTransform transform=CRS.findMathTransform(sourceCRS,targetCRS);
      p=JTS.transform(p,transform).getCentroid();
      p=geomFact.createPoint(new Coordinate(p.getY(),p.getX()));
      LOG.trace("String_Node_Str" + p.getX() + "String_Node_Str"+ p.getY()+ "String_Node_Str");
    }
 catch (    Throwable t) {
      LOG.error("String_Node_Str",t);
    }
  }
  return p;
}

Fixed version (ground truth):
public static com.vividsolutions.jts.geom.Point getPoint(WayPointType startPoint,CoordinateReferenceSystem targetCRS){
  PositionType ptype=(PositionType)startPoint.getLocation().getValue();
  PointType pointType=ptype.getPoint();
  DirectPositionType ctype=pointType.getPos();
  CoordinateReferenceSystem sourceCRS=getSRS(startPoint);
  LOG.trace(sourceCRS.toWKT());
  LOG.trace("String_Node_Str" + ctype.getValue().get(0) + "String_Node_Str"+ ctype.getValue().get(1)+ "String_Node_Str");
  com.vividsolutions.jts.geom.Point p=geomFact.createPoint(new Coordinate(ctype.getValue().get(0),ctype.getValue().get(1)));
  LOG.info(p);
  if (targetCRS != null && !sourceCRS.equals(targetCRS)) {
    try {
      MathTransform transform=CRS.findMathTransform(sourceCRS,targetCRS);
      p=JTS.transform(p,transform).getCentroid();
      p=geomFact.createPoint(new Coordinate(p.getY(),p.getX()));
      LOG.info(p);
    }
 catch (    Throwable t) {
      LOG.error("String_Node_Str",t);
    }
  }
  return p;
}
Program: 44457
Project: 44457
Buggy source:
public void editPeriodEnd(final String value){
  Date dateParsed=editDate(period.endTime(),value);
  if (dateParsed != null)   tasksSystem.setPeriodEnding(task,periodIndex(),dateParsed);
}

Fixed version (ground truth):
public void editPeriodEnd(final String value){
  Date dateParsed=editDate(period.startTime(),value);
  if (dateParsed != null)   tasksSystem.setPeriodEnding(task,periodIndex(),dateParsed);
}
Program: 44458
Project: 44458
Buggy source:
@Override public void run(){
  worklogListModel.sendWorklog();
}

Fixed version (ground truth):
@Override public void run(){
  worklogListModel.sendWorklog();
  updateWorklogList();
}
Program: 44459
Project: 44459
Buggy source:
private void sendWorklog(){
  new Thread(new Runnable(){
    @Override public void run(){
      worklogListModel.sendWorklog();
    }
  }
).start();
}

Fixed version (ground truth):
private void sendWorklog(){
  new Thread(new Runnable(){
    @Override public void run(){
      worklogListModel.sendWorklog();
      updateWorklogList();
    }
  }
).start();
}
Program: 44460
Project: 44460
Buggy source:
void onTaskData(final TaskData object){
  final ObjectIdentity taskId=provider.provideId();
  CreateTaskEvent3 createTaskEvent=new CreateTaskEvent3(taskId,object.getTaskName(),object.getBudget(),object.getLabel());
  SetJiraIssueToTask setIssueEvent=jiraEventFactory.createSetIssueToTaskEvent(taskId,object.getJiraIssue());
  consumer.consume(createTaskEvent);
  consumer.consume(setIssueEvent);
}

Fixed version (ground truth):
void onTaskData(final TaskData object){
  final ObjectIdentity taskId=provider.provideId();
  CreateTaskEvent3 createTaskEvent=new CreateTaskEvent3(taskId,object.getTaskName(),object.getBudget(),object.getLabel());
  SetJiraIssueToTask setIssueEvent=null;
  if (object.getJiraIssue() != null)   setIssueEvent=jiraEventFactory.createSetIssueToTaskEvent(taskId,object.getJiraIssue());
  consumer.consume(createTaskEvent);
  if (setIssueEvent != null)   consumer.consume(setIssueEvent);
}
Program: 44461
Project: 44461
Buggy source:
@Override public void run(){
  sendWorklog();
}

Fixed version (ground truth):
@Override public void run(){
  sendWorklog();
  updateWorklogList();
}
Program: 44462
Project: 44462
Buggy source:
private void startSendWorklogThread(){
  new Thread(new Runnable(){
    @Override public void run(){
      sendWorklog();
    }
  }
).start();
}

Fixed version (ground truth):
private void startSendWorklogThread(){
  new Thread(new Runnable(){
    @Override public void run(){
      sendWorklog();
      updateWorklogList();
    }
  }
).start();
}
Program: 44463
Project: 44463
Buggy source:
public void sendWorklog(){
  final List<Worklog> worklogs=selectedTaskWorklogs();
  for (  final Worklog worklog : worklogs) {
    worklog.send();
    changeAlert.fire();
  }
}

Fixed version (ground truth):
public synchronized void sendWorklog(){
  final List<Worklog> worklogs=selectedTaskWorklogs();
  for (  final Worklog worklog : worklogs) {
    worklog.send();
    changeAlert.fire();
  }
}
Program: 44464
Project: 44464
Buggy source:
@Override public void run(){
  worklogListModel.sendWorklog();
}

Fixed version (ground truth):
@Override public void run(){
  sendWorklog();
}
Program: 44465
Project: 44465
Buggy source:
private void addSendWorklogListener(){
  sendWorkLogButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    final ActionEvent e){
      sendWorklog();
    }
  }
);
}

Fixed version (ground truth):
private void addSendWorklogListener(){
  sendWorkLogButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    final ActionEvent e){
      startSendWorklogThread();
    }
  }
);
}
Program: 44466
Project: 44466
Buggy source:
private void sendWorklog(){
  new Thread(new Runnable(){
    @Override public void run(){
      worklogListModel.sendWorklog();
    }
  }
).start();
}

Fixed version (ground truth):
private void sendWorklog(){
  try {
    sendWorkLogButton.setEnabled(false);
    worklogListModel.sendWorklog();
  }
  finally {
    sendWorkLogButton.setEnabled(true);
  }
}
Program: 44467
Project: 44467
Buggy source:
private void defineDatas(){
  datas=new Object[issues.size()][columns.length];
  for (int x=0; x < issues.size(); x++) {
    RemoteJiraIssue issue=issues.get(x);
    datas[x][0]=issue.getKey();
    datas[x][1]=issue.getSummary();
    datas[x][2]=issue.getStatus();
    datas[x][COLUMN_ACTIONS]="String_Node_Str";
    datas[x][COLUMN_ASSIGN_TO]=issue.getAssignee();
    datas[x][COLUMN_COMMENT]="String_Node_Str";
  }
}

Fixed version (ground truth):
private void defineDatas(){
  datas=new Object[issues.size()][columns.length];
  for (int x=0; x < issues.size(); x++) {
    RemoteJiraIssue issue=issues.get(x);
    datas[x][0]=issue.getKey();
    datas[x][1]=issue.getSummary();
    datas[x][2]=issue.getStatus();
    datas[x][COLUMN_ACTIONS]=null;
    datas[x][COLUMN_ASSIGN_TO]=issue.getAssignee();
    datas[x][COLUMN_COMMENT]="String_Node_Str";
  }
}
Program: 44468
Project: 44468
Buggy source:
@Override public void run(){
  tasksList.setSelectedValue(task,true);
}

Fixed version (ground truth):
@Override public void run(){
  tasksList.setSelectedValue(task,true);
  screenData.setSelectedTask(task.name());
}
Program: 44469
Project: 44469
Buggy source:
public void setSelectedTask(final TaskView task){
class SetSelectedValue implements Runnable {
    @Override public void run(){
      tasksList.setSelectedValue(task,true);
    }
  }
  SwingUtilities.invokeLater(new SetSelectedValue());
}

Fixed version (ground truth):
public void setSelectedTask(final TaskView task){
class SetSelectedValue implements Runnable {
    @Override public void run(){
      tasksList.setSelectedValue(task,true);
      screenData.setSelectedTask(task.name());
    }
  }
  SwingUtilities.invokeLater(new SetSelectedValue());
}
Program: 44470
Project: 44470
Buggy source:
public void clear(){
  toDraw=false;
  StylesFactory.clearCache();
  style=StylesFactory.getCurrentStyle();
}

Fixed version (ground truth):
public void clear(){
  toDraw=false;
  StylesFactory.clearCache();
  setStyle(StylesFactory.getCurrentStyle());
}
Program: 44471
Project: 44471
Buggy source:
public void setStyle(Style style){
  toDraw=false;
  this.style=style;
}

Fixed version (ground truth):
public void setStyle(Style style){
  toDraw=false;
  style.setColor(color);
  this.style=style;
}
Program: 44472
Project: 44472
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  upgrade();
  surface=new Surface(this);
  LayoutParams params=new LayoutParams(android.view.ViewGroup.LayoutParams.FILL_PARENT,android.view.ViewGroup.LayoutParams.FILL_PARENT);
  setContentView(surface,params);
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  surface=new Surface(this);
  LayoutParams params=new LayoutParams(android.view.ViewGroup.LayoutParams.FILL_PARENT,android.view.ViewGroup.LayoutParams.FILL_PARENT);
  setContentView(surface,params);
}
Program: 44473
Project: 44473
Buggy source:
protected Void doInBackground(Void... urls){
  surface.getThread().pauseDrawing();
  String path="String_Node_Str";
  String filename="String_Node_Str";
  String extension="String_Node_Str";
  if (!new File(path).exists()) {
    new File(path).mkdirs();
  }
  int suffix=1;
  while (new File(path + filename + suffix+ extension).exists()) {
    suffix++;
  }
  final String fileName=path + filename + suffix+ extension;
  try {
    surface.saveBitmap(fileName);
  }
 catch (  FileNotFoundException e) {
    e.printStackTrace();
  }
  return null;
}

Fixed version (ground truth):
protected Void doInBackground(Void... urls){
  surface.getThread().pauseDrawing();
  String sdPath=Environment.getExternalStorageDirectory().getAbsolutePath();
  String path=sdPath + "String_Node_Str";
  String filename="String_Node_Str";
  String extension="String_Node_Str";
  if (!new File(path).exists()) {
    new File(path).mkdirs();
  }
  int suffix=1;
  while (new File(path + filename + suffix+ extension).exists()) {
    suffix++;
  }
  final String fileName=path + filename + suffix+ extension;
  try {
    surface.saveBitmap(fileName);
  }
 catch (  FileNotFoundException e) {
    throw new RuntimeException(e);
  }
  Uri uri=Uri.fromFile(new File(fileName));
  sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE,uri));
  return null;
}
Program: 44474
Project: 44474
Buggy source:
@Override public boolean onCreateOptionsMenu(Menu menu){
  super.onCreateOptionsMenu(menu);
  menu.add(0,MENU_SAVE,0,"String_Node_Str").setIcon(R.drawable.save);
  menu.add(0,MENU_SEND,0,"String_Node_Str").setIcon(R.drawable.send);
  menu.add(0,MENU_CLEAR,0,"String_Node_Str").setIcon(R.drawable.clear);
  SubMenu subMenu=menu.addSubMenu("String_Node_Str").setIcon(R.drawable.brushes);
  subMenu.add(GROUP_BRUSHES,StylesFactory.SKETCHY,0,"String_Node_Str");
  subMenu.add(GROUP_BRUSHES,StylesFactory.SIMPLE,0,"String_Node_Str");
  subMenu.add(GROUP_BRUSHES,StylesFactory.SHADED,0,"String_Node_Str");
  subMenu.add(GROUP_BRUSHES,StylesFactory.CHROME,0,"String_Node_Str");
  subMenu.add(GROUP_BRUSHES,StylesFactory.FUR,0,"String_Node_Str");
  subMenu.add(GROUP_BRUSHES,StylesFactory.LONGFUR,0,"String_Node_Str");
  subMenu.add(GROUP_BRUSHES,StylesFactory.WEB,0,"String_Node_Str");
  subMenu.add(GROUP_BRUSHES,StylesFactory.SQUARES,0,"String_Node_Str");
  subMenu.add(GROUP_BRUSHES,StylesFactory.RIBBON,0,"String_Node_Str");
  subMenu.add(GROUP_BRUSHES,StylesFactory.CIRCLES,0,"String_Node_Str");
  subMenu.add(GROUP_BRUSHES,StylesFactory.GRID,0,"String_Node_Str");
  return true;
}

Fixed version (ground truth):
@Override public boolean onCreateOptionsMenu(Menu menu){
  super.onCreateOptionsMenu(menu);
  menu.add(0,MENU_SAVE,0,"String_Node_Str").setIcon(R.drawable.save);
  menu.add(0,MENU_SEND,0,"String_Node_Str").setIcon(R.drawable.send);
  menu.add(0,MENU_CLEAR,0,"String_Node_Str").setIcon(R.drawable.clear);
  menu.add(0,MENU_COLOR,0,"String_Node_Str");
  SubMenu subMenu=menu.addSubMenu("String_Node_Str").setIcon(R.drawable.brushes);
  subMenu.add(GROUP_BRUSHES,StylesFactory.SKETCHY,0,"String_Node_Str");
  subMenu.add(GROUP_BRUSHES,StylesFactory.SIMPLE,0,"String_Node_Str");
  subMenu.add(GROUP_BRUSHES,StylesFactory.SHADED,0,"String_Node_Str");
  subMenu.add(GROUP_BRUSHES,StylesFactory.CHROME,0,"String_Node_Str");
  subMenu.add(GROUP_BRUSHES,StylesFactory.FUR,0,"String_Node_Str");
  subMenu.add(GROUP_BRUSHES,StylesFactory.LONGFUR,0,"String_Node_Str");
  subMenu.add(GROUP_BRUSHES,StylesFactory.WEB,0,"String_Node_Str");
  subMenu.add(GROUP_BRUSHES,StylesFactory.SQUARES,0,"String_Node_Str");
  subMenu.add(GROUP_BRUSHES,StylesFactory.RIBBON,0,"String_Node_Str");
  subMenu.add(GROUP_BRUSHES,StylesFactory.CIRCLES,0,"String_Node_Str");
  subMenu.add(GROUP_BRUSHES,StylesFactory.GRID,0,"String_Node_Str");
  return true;
}
Program: 44475
Project: 44475
Buggy source:
@Override public boolean onOptionsItemSelected(MenuItem item){
  if (item.getGroupId() == GROUP_BRUSHES) {
    surface.setStyle(StylesFactory.getStyle(item.getItemId()));
    return true;
  }
switch (item.getItemId()) {
case MENU_CLEAR:
    surface.clearBitmap();
  return true;
case MENU_SAVE:
saveToSD();
return true;
case MENU_SEND:
sendImage();
return true;
default :
return false;
}
}

Fixed version (ground truth):
@Override public boolean onOptionsItemSelected(MenuItem item){
  if (item.getGroupId() == GROUP_BRUSHES) {
    surface.setStyle(StylesFactory.getStyle(item.getItemId()));
    return true;
  }
switch (item.getItemId()) {
case MENU_CLEAR:
    surface.clearBitmap();
  return true;
case MENU_SAVE:
saveToSD();
return true;
case MENU_SEND:
sendImage();
return true;
case MENU_COLOR:
new ColorPickerDialog(this,new OnColorChangedListener(){
@Override public void colorChanged(int color){
surface.setPaintColor(color);
}
}
,surface.getPaintColor()).show();
return true;
default :
return false;
}
}
Program: 44476
Project: 44476
Buggy source:
private void saveToSD(){
  String externalStorageState=Environment.getExternalStorageState();
  if (!externalStorageState.equals(Environment.MEDIA_MOUNTED)) {
    Toast.makeText(this,"String_Node_Str",Toast.LENGTH_SHORT).show();
    return;
  }
  final ProgressDialog dialog=ProgressDialog.show(this,"String_Node_Str","String_Node_Str",true);
  new AsyncTask<Void,Void,Void>(){
    protected Void doInBackground(    Void... urls){
      surface.getThread().pauseDrawing();
      String path="String_Node_Str";
      String filename="String_Node_Str";
      String extension="String_Node_Str";
      if (!new File(path).exists()) {
        new File(path).mkdirs();
      }
      int suffix=1;
      while (new File(path + filename + suffix+ extension).exists()) {
        suffix++;
      }
      final String fileName=path + filename + suffix+ extension;
      try {
        surface.saveBitmap(fileName);
      }
 catch (      FileNotFoundException e) {
        e.printStackTrace();
      }
      return null;
    }
    protected void onPostExecute(    Void result){
      surface.getThread().resumeDrawing();
      dialog.hide();
    }
  }
.execute();
}

Fixed version (ground truth):
private void saveToSD(){
  String externalStorageState=Environment.getExternalStorageState();
  if (!externalStorageState.equals(Environment.MEDIA_MOUNTED)) {
    Toast.makeText(this,"String_Node_Str",Toast.LENGTH_SHORT).show();
    return;
  }
  final ProgressDialog dialog=ProgressDialog.show(this,"String_Node_Str","String_Node_Str",true);
  new AsyncTask<Void,Void,Void>(){
    protected Void doInBackground(    Void... urls){
      surface.getThread().pauseDrawing();
      String sdPath=Environment.getExternalStorageDirectory().getAbsolutePath();
      String path=sdPath + "String_Node_Str";
      String filename="String_Node_Str";
      String extension="String_Node_Str";
      if (!new File(path).exists()) {
        new File(path).mkdirs();
      }
      int suffix=1;
      while (new File(path + filename + suffix+ extension).exists()) {
        suffix++;
      }
      final String fileName=path + filename + suffix+ extension;
      try {
        surface.saveBitmap(fileName);
      }
 catch (      FileNotFoundException e) {
        throw new RuntimeException(e);
      }
      Uri uri=Uri.fromFile(new File(fileName));
      sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE,uri));
      return null;
    }
    protected void onPostExecute(    Void result){
      surface.getThread().resumeDrawing();
      dialog.hide();
    }
  }
.execute();
}
Program: 44477
Project: 44477
Buggy source:
private String getDocWikiFileName(String filePath){
  String name=Disks.getRelativePath(rootDir,Files.findFile(filePath));
  int pos=name.lastIndexOf('.');
  if (pos > 0)   name=name.substring(0,pos);
  return name.replace('/','_');
}

Fixed version (ground truth):
private String getDocWikiFileName(String filePath){
  String name=Disks.getRelativePath(rootDir,Files.findFile(filePath));
  int pos=name.lastIndexOf('.');
  if (pos > 0)   name=name.substring(0,pos);
  return name.replace('/','_').replace('.','_');
}
Program: 44478
Project: 44478
Buggy source:
private void reading(){
  for (; i < cs.length; i++) {
    char c=cs[i];
switch (c) {
case '{':
      forStyle();
    break;
case '`':
  forEscaping();
break;
case '<':
forImage();
break;
case '[':
forLink();
break;
default :
if (endles.last() == c) {
endles.popLast();
return;
}
ep.sb.append(c);
}
}
}

Fixed version (ground truth):
private void reading(){
  for (; i < cs.length; i++) {
    char c=cs[i];
switch (c) {
case '$':
      forVariable();
    break;
case '{':
  forStyle();
break;
case '`':
forEscaping();
break;
case '<':
forImage();
break;
case '[':
forLink();
break;
default :
if (endles.last() == c) {
endles.popLast();
return;
}
ep.sb.append(c);
}
}
}
Program: 44479
Project: 44479
Buggy source:
BlockMaker(char[] cs){
  this.cs=cs;
  this.ep=new EleHolder();
  this.block=ZD.p();
  this.endles=new LinkedCharArray();
}

Fixed version (ground truth):
BlockMaker(Context context,char[] cs){
  this.context=context == null ? new Context() : context;
  this.cs=cs;
  this.ep=new EleHolder();
  this.block=ZD.p();
  this.endles=new LinkedCharArray();
}
Program: 44480
Project: 44480
Buggy source:
static ZBlock toBlock(char[] cs){
  return new BlockMaker(cs).make();
}

Fixed version (ground truth):
private ZBlock toBlock(char[] cs){
  return new BlockMaker(context,cs).make();
}
Program: 44481
Project: 44481
Buggy source:
Parsing(BufferedReader reader){
  this.reader=reader;
}

Fixed version (ground truth):
Parsing(BufferedReader reader){
  this.reader=reader;
  this.context=new Context().set("String_Node_Str",Calendar.getInstance());
}
Program: 44482
Project: 44482
Buggy source:
ZDoc parse(int tabpar){
  ScanResult sr=new Scanning(tabpar).scan(reader);
  doc=sr.doc();
  transform(doc.root(),sr.root());
  return doc;
}

Fixed version (ground truth):
ZDoc parse(int tabpar){
  ScanResult sr=new Scanning(tabpar).scan(reader);
  doc=sr.doc();
  if (!Strings.isBlank(doc.getTitle()))   context.set("String_Node_Str",doc.getTitle());
  transform(doc.root(),sr.root());
  return doc;
}
Program: 44483
Project: 44483
Buggy source:
private ZBlock makeBlockAndClearStack(LinkedList<Line> stack){
  ZBlock re;
  Line first=stack.getFirst();
  if (first.isOLI() || first.isULI()) {
    re=first.isOLI() ? ol() : ul();
    Iterator<Line> it=stack.iterator();
    while (it.hasNext()) {
      Line line=it.next();
      ZBlock li=line.toBlock().setType(first.type);
      re.add(li);
      transform(li,line);
    }
  }
 else   if (first.isRow()) {
    re=table();
    Iterator<Line> it=stack.iterator();
    while (it.hasNext()) {
      ZBlock row=row();
      List<LinkedCharArray> list=findCells(it.next().getText().toCharArray());
      Iterator<LinkedCharArray> j=list.iterator();
      while (j.hasNext()) {
        char[] cs=j.next().toArray();
        row.add(toBlock(cs));
      }
      re.add(row);
    }
  }
 else {
    StringBuilder sb=new StringBuilder();
    Iterator<Line> it=stack.iterator();
    while (it.hasNext()) {
      Line line=it.next();
      if (!line.isBlank())       sb.append(line.getText());
    }
    re=toBlock(sb.toString().toCharArray());
    if (stack.getLast().hasChild())     transform(re,stack.getLast());
  }
  stack.clear();
  return re;
}

Fixed version (ground truth):
private ZBlock makeBlockAndClearStack(LinkedList<Line> stack){
  ZBlock re;
  Line first=stack.getFirst();
  if (first.isOLI() || first.isULI()) {
    re=first.isOLI() ? ol() : ul();
    Iterator<Line> it=stack.iterator();
    while (it.hasNext()) {
      Line line=it.next();
      ZBlock li=toBlock(line.getCharArray()).setType(first.type);
      re.add(li);
      transform(li,line);
    }
  }
 else   if (first.isRow()) {
    re=table();
    Iterator<Line> it=stack.iterator();
    while (it.hasNext()) {
      ZBlock row=row();
      List<LinkedCharArray> list=findCells(it.next().getText().toCharArray());
      Iterator<LinkedCharArray> j=list.iterator();
      while (j.hasNext()) {
        char[] cs=j.next().toArray();
        row.add(toBlock(cs));
      }
      re.add(row);
    }
  }
 else {
    StringBuilder sb=new StringBuilder();
    Iterator<Line> it=stack.iterator();
    while (it.hasNext()) {
      Line line=it.next();
      if (!line.isBlank())       sb.append(line.getText());
    }
    re=toBlock(sb.toString().toCharArray());
    if (stack.getLast().hasChild())     transform(re,stack.getLast());
  }
  stack.clear();
  return re;
}
Program: 44484
Project: 44484
Buggy source:
@Test public void test_link_in_style(){
  ZBlock p=p("String_Node_Str");
  assertEquals("String_Node_Str",p.ele(0).getText());
  assertEquals("String_Node_Str",p.ele(0).getHref().getValue());
  assertTrue(p.ele(0).getStyle().getFont().isBold());
  assertTrue(p.ele(0).getStyle().getFont().isItalic());
  assertEquals("String_Node_Str",p.ele(1).getText());
}

Fixed version (ground truth):
@Test public void test_link_in_style(){
  ZBlock p=P("String_Node_Str");
  assertEquals("String_Node_Str",p.ele(0).getText());
  assertEquals("String_Node_Str",p.ele(0).getHref().getValue());
  assertTrue(p.ele(0).getStyle().getFont().isBold());
  assertTrue(p.ele(0).getStyle().getFont().isItalic());
  assertEquals("String_Node_Str",p.ele(1).getText());
}
Program: 44485
Project: 44485
Buggy source:
@Test public void very_simple_case(){
  ZBlock p=p("String_Node_Str");
  ZEle[] eles=p.eles();
  assertEquals(3,eles.length);
  assertEquals("String_Node_Str",eles[0].getText());
  assertFalse(eles[0].hasStyle());
  assertEquals("String_Node_Str",eles[1].getText());
  assertTrue(eles[1].getStyle().getFont().isBold());
  assertTrue(eles[1].getStyle().getFont().isNormal());
  assertFalse(eles[1].getStyle().getFont().isItalic());
  assertFalse(eles[1].getStyle().getFont().isSub());
  assertEquals("String_Node_Str",eles[2].getText());
  assertFalse(eles[2].hasStyle());
}

Fixed version (ground truth):
@Test public void very_simple_case(){
  ZBlock p=P("String_Node_Str");
  ZEle[] eles=p.eles();
  assertEquals(3,eles.length);
  assertEquals("String_Node_Str",eles[0].getText());
  assertFalse(eles[0].hasStyle());
  assertEquals("String_Node_Str",eles[1].getText());
  assertTrue(eles[1].getStyle().getFont().isBold());
  assertTrue(eles[1].getStyle().getFont().isNormal());
  assertFalse(eles[1].getStyle().getFont().isItalic());
  assertFalse(eles[1].getStyle().getFont().isSub());
  assertEquals("String_Node_Str",eles[2].getText());
  assertFalse(eles[2].hasStyle());
}
Program: 44486
Project: 44486
Buggy source:
@Test public void test_image_remote(){
  ZBlock p=p("String_Node_Str");
  ZEle img=p.ele(0);
  assertEquals("String_Node_Str",img.getSrc().getPath());
  assertTrue(img.getSrc().isHttp());
}

Fixed version (ground truth):
@Test public void test_image_remote(){
  ZBlock p=P("String_Node_Str");
  ZEle img=p.ele(0);
  assertEquals("String_Node_Str",img.getSrc().getPath());
  assertTrue(img.getSrc().isHttp());
}
Program: 44487
Project: 44487
Buggy source:
@Test public void test_style_in_link_partly(){
  ZBlock p=p("String_Node_Str");
  assertEquals("String_Node_Str",p.ele(0).getHref().getValue());
  assertEquals("String_Node_Str",p.ele(0).getText());
  assertTrue(p.ele(0).getStyle().getFont().isBold());
  assertTrue(p.ele(0).getStyle().getFont().isItalic());
  assertEquals("String_Node_Str",p.ele(1).getText());
}

Fixed version (ground truth):
@Test public void test_style_in_link_partly(){
  ZBlock p=P("String_Node_Str");
  assertEquals("String_Node_Str",p.ele(0).getHref().getValue());
  assertEquals("String_Node_Str",p.ele(0).getText());
  assertTrue(p.ele(0).getStyle().getFont().isBold());
  assertTrue(p.ele(0).getStyle().getFont().isItalic());
  assertEquals("String_Node_Str",p.ele(1).getText());
}
Program: 44488
Project: 44488
Buggy source:
@Test public void test_simple_image(){
  ZBlock p=p("String_Node_Str");
  assertTrue(p.ele(0).isImage());
  assertEquals("String_Node_Str",p.ele(0).getSrc().getValue());
}

Fixed version (ground truth):
@Test public void test_simple_image(){
  ZBlock p=P("String_Node_Str");
  assertTrue(p.ele(0).isImage());
  assertEquals("String_Node_Str",p.ele(0).getSrc().getValue());
}
Program: 44489
Project: 44489
Buggy source:
@Test public void test_link_in_style_partly(){
  ZBlock p=p("String_Node_Str");
  assertEquals("String_Node_Str",p.ele(0).getHref().getValue());
  assertEquals("String_Node_Str",p.ele(0).getText());
  assertTrue(p.ele(0).getStyle().getFont().isBold());
  assertTrue(p.ele(0).getStyle().getFont().isItalic());
  assertEquals("String_Node_Str",p.ele(1).getText());
}

Fixed version (ground truth):
@Test public void test_link_in_style_partly(){
  ZBlock p=P("String_Node_Str");
  assertEquals("String_Node_Str",p.ele(0).getHref().getValue());
  assertEquals("String_Node_Str",p.ele(0).getText());
  assertTrue(p.ele(0).getStyle().getFont().isBold());
  assertTrue(p.ele(0).getStyle().getFont().isItalic());
  assertEquals("String_Node_Str",p.ele(1).getText());
}
Program: 44490
Project: 44490
Buggy source:
@Test public void test_nest_var(){
  ZBlock p=p("String_Node_Str");
  assertEquals("String_Node_Str",p.ele(0).getText());
  assertEquals("String_Node_Str",p.ele(1).getText());
  assertTrue(p.ele(1).getStyle().font().isBold());
  assertEquals("String_Node_Str",p.ele(2).getText());
}

Fixed version (ground truth):
@Test public void test_nest_var(){
  ZBlock p=P("String_Node_Str");
  assertEquals("String_Node_Str",p.ele(0).getText());
  assertEquals("String_Node_Str",p.ele(1).getText());
  assertTrue(p.ele(1).getStyle().font().isBold());
  assertEquals("String_Node_Str",p.ele(2).getText());
}