nus-yam/ex-repair huggingface dataset:
Program: 155381
Project: 155381
Buggy source:
public void setData(List<Map> data){
  this.elements=new ArrayList<Element>();
  this.rows=data.size() / this.cols;
  int size=data.size();
  for (int i=0; i < size; i++) {
    try {
      if (i <= this.rows || i % this.rows == 0 || (i + 1) % this.rows == 0 || size - this.rows < i) {
        Map type=new HashMap();
        type.put("String_Node_Str","String_Node_Str");
        data.set(i,type);
      }
      this.getElements().add(Element.factory(data.get(i)));
    }
 catch (    Exception e) {
      System.out.println(e.getMessage());
    }
  }
  Dimension panel_size=new Dimension((3 * this.cols + this.rows) * this.unit_pixels,(this.cols + 2 * this.rows) * this.unit_pixels);
  this.setMinimumSize(panel_size);
  this.setPreferredSize(panel_size);
  Window.getInstance().pack();
  this.repaint();
}

Fixed version (ground truth):
public void setData(List<Map> data){
  this.elements=new ArrayList<Element>();
  this.rows=data.size() / this.cols;
  int size=data.size();
  for (int i=0; i < size; i++) {
    try {
      this.getElements().add(Element.factory(data.get(i)));
    }
 catch (    Exception e) {
      System.out.println(e.getMessage());
    }
  }
  Dimension panel_size=new Dimension((3 * this.cols + this.rows) * this.unit_pixels,(this.cols + 2 * this.rows) * this.unit_pixels);
  this.setMinimumSize(panel_size);
  this.setPreferredSize(panel_size);
  Window.getInstance().pack();
  this.repaint();
}
Program: 155382
Project: 155382
Buggy source:
@Override public void paintComponent(Graphics g){
  super.paintComponent(g);
  if (this.getElements() == null) {
    return;
  }
  Collection<Player> players=Game.getInstance().getPlayers().values();
  for (int j=0; j < this.rows; j++) {
    for (int i=this.cols - 1; i >= 0; i--) {
      try {
        Element element=this.getElements().get(i * this.cols + j);
        if (element == null) {
          continue;
        }
        int x=this.getPosX(i,j) * this.unit_pixels;
        int y=this.getPosY(i,j) * this.unit_pixels;
        g.drawImage(element.getImage(),x,y,this);
      }
 catch (      Exception e) {
        System.out.println(e.getMessage());
      }
    }
    for (    Player player : players) {
      if (player.getY() == j) {
        int x=this.getPosX(player.getX(),player.getY()) * this.unit_pixels;
        int y=this.getPosY(player.getX(),player.getY()) * this.unit_pixels;
        if (player.getMovePogression() != 1) {
          int old_x=this.getPosX(player.getOldX(),player.getOldY()) * this.unit_pixels;
          int old_y=this.getPosY(player.getOldX(),player.getOldY()) * this.unit_pixels;
          x=(old_x + (int)((x - old_x) * player.getMovePogression()));
          y=(old_y + (int)((y - old_y) * player.getMovePogression()));
        }
        g.drawImage(player.getImage(),x,y,this);
      }
    }
  }
}

Fixed version (ground truth):
@Override public void paintComponent(Graphics g){
  super.paintComponent(g);
  if (this.getElements() == null) {
    return;
  }
  Collection<Player> players=Game.getInstance().getPlayers().values();
  for (int j=0; j < this.rows; j++) {
    for (int i=this.cols - 1; i >= 0; i--) {
      try {
        Element element=this.getElements().get(j * this.cols + i);
        if (element == null) {
          continue;
        }
        int x=this.getPosX(i,j) * this.unit_pixels;
        int y=this.getPosY(i,j) * this.unit_pixels;
        g.drawImage(element.getImage(),x,y,this);
      }
 catch (      Exception e) {
        System.out.println(e.getMessage());
      }
    }
    for (    Player player : players) {
      if (player.getY() == j) {
        int x=this.getPosX(player.getX(),player.getY()) * this.unit_pixels;
        int y=this.getPosY(player.getX(),player.getY()) * this.unit_pixels;
        if (player.getMovePogression() != 1) {
          int old_x=this.getPosX(player.getOldX(),player.getOldY()) * this.unit_pixels;
          int old_y=this.getPosY(player.getOldX(),player.getOldY()) * this.unit_pixels;
          x=(old_x + (int)((x - old_x) * player.getMovePogression()));
          y=(old_y + (int)((y - old_y) * player.getMovePogression()));
        }
        g.drawImage(player.getImage(),x,y,this);
      }
    }
  }
}
Program: 155384
Project: 155384
Buggy source:
public void generate(){
  this.elements=new ArrayList<Element>();
  int size=this.cols * this.rows;
  for (int i=0; i < size; i++) {
    Element element=null;
    if (Math.random() < this.probability_wall) {
      element=new Wall();
    }
    if (i <= this.rows || i % this.rows == 0 || (i + 1) % this.rows == 0 || size - this.rows < i) {
      Wall wall=new Wall();
      wall.setBreakable(false);
      element=wall;
    }
    this.elements.add(element);
  }
}

Fixed version (ground truth):
public void generate(){
  this.elements=new ArrayList<Element>();
  int size=this.cols * this.rows;
  for (int i=0; i < size; i++) {
    Element element=null;
    if (i <= this.rows || i % this.rows == 0 || (i + 1) % this.rows == 0 || size - this.rows < i) {
      Wall wall=new Wall();
      wall.setBreakable(false);
      element=wall;
    }
 else     if (Math.random() < this.probability_wall) {
      element=new Wall();
    }
    this.elements.add(element);
  }
}
Program: 155386
Project: 155386
Buggy source:
private void move(int diff_x,int diff_y){
  Boolean moving_allowed=false;
  if (Math.abs(diff_x) + Math.abs(diff_y) == 1) {
    moving_allowed=true;
  }
  int target_x=this.position_x + diff_x;
  int target_y=this.position_y + diff_y;
  int target_index=target_x * Server.board.getRows() + target_y;
  if (Server.board.getElements().get(target_index) instanceof Wall || Server.board.getElements().get(target_index) instanceof Bomb) {
    moving_allowed=false;
  }
  if (moving_allowed) {
    this.position_x+=diff_x;
    this.position_y+=diff_y;
    ArrayList<Integer> move=new ArrayList<Integer>();
    move.add(this.client_id);
    move.add(this.position_x);
    move.add(this.position_y);
    ArrayList<Integer> exceptions=new ArrayList<Integer>();
    exceptions.add(this.client_id);
    Server.sendAllBut("String_Node_Str",move,exceptions);
  }
 else {
    ArrayList<Integer> position=new ArrayList<Integer>();
    position.add(this.client_id);
    position.add(this.position_x);
    position.add(this.position_y);
    this.send("String_Node_Str",position);
  }
}

Fixed version (ground truth):
private void move(int diff_x,int diff_y){
  Boolean moving_allowed=false;
  if (Math.abs(diff_x) + Math.abs(diff_y) == 1) {
    moving_allowed=true;
  }
  int target_x=this.position_x + diff_x;
  int target_y=this.position_y + diff_y;
  int target_index=target_x + Server.board.getCols() * target_y;
  if (Server.board.getElements().get(target_index) instanceof Wall || Server.board.getElements().get(target_index) instanceof Bomb) {
    moving_allowed=false;
  }
  if (moving_allowed) {
    this.position_x+=diff_x;
    this.position_y+=diff_y;
    ArrayList<Integer> move=new ArrayList<Integer>();
    move.add(this.client_id);
    move.add(this.position_x);
    move.add(this.position_y);
    ArrayList<Integer> exceptions=new ArrayList<Integer>();
    exceptions.add(this.client_id);
    Server.sendAllBut("String_Node_Str",move,exceptions);
  }
 else {
    ArrayList<Integer> position=new ArrayList<Integer>();
    position.add(this.client_id);
    position.add(this.position_x);
    position.add(this.position_y);
    this.send("String_Node_Str",position);
  }
}
Program: 155387
Project: 155387
Buggy source:
public void setRandomPosition(){
  double nb_cases=Server.board.getCols() * Server.board.getRows();
  int i, x, y;
  Map<Integer,Integer> players_positions=Server.getPlayersPositions();
  do {
    i=(int)Math.round(Math.random() * nb_cases);
    x=(int)Math.ceil(i / Server.board.getRows());
    y=i % Server.board.getRows();
  }
 while (Server.board.getElements().get(i) != null || players_positions.containsKey(x) && players_positions.get(x) == y);
  this.position_x=x;
  this.position_y=y;
}

Fixed version (ground truth):
public void setRandomPosition(){
  double nb_cases=Server.board.getCols() * Server.board.getRows();
  int i, x, y;
  Map<Integer,Integer> players_positions=Server.getPlayersPositions();
  do {
    i=(int)Math.round(Math.random() * nb_cases);
    x=i % Server.board.getCols();
    y=(int)Math.ceil(i / Server.board.getCols());
  }
 while (Server.board.getElements().get(i) != null || players_positions.containsKey(x) && players_positions.get(x) == y);
  this.position_x=x;
  this.position_y=y;
}
Program: 155388
Project: 155388
Buggy source:
public void run(){
  try {
    ArrayList<Integer> bomb_position=new ArrayList<Integer>();
    bomb_position.add(bomb.getX());
    bomb_position.add(bomb.getY());
    Thread.sleep(bomb.getSleepingTime());
    HashMap<Integer,ServerThread> players_threads=Server.getPlayersThreads();
    for (int i=1; i < Server.board.getCols() - 1; i++) {
      int index=i * Server.board.getRows() + bomb.getY();
      Element element=Server.board.getElements().get(index);
      if (element != null) {
        element.setActive(false);
      }
      for (      ServerThread thread : players_threads.values()) {
        if (thread.getPostionX() == i && thread.getPositionY() == bomb.getY()) {
          Server.killPlayer(thread.getClientId());
        }
      }
    }
    for (int i=1; i < Server.board.getRows() - 1; i++) {
      int index=bomb.getX() * Server.board.getRows() + i;
      Element element=Server.board.getElements().get(index);
      if (element != null) {
        element.setActive(false);
      }
      for (      ServerThread thread : players_threads.values()) {
        if (thread.getPostionX() == bomb.getX() && thread.getPositionY() == i) {
          Server.killPlayer(thread.getClientId());
        }
      }
    }
    Server.sendAll("String_Node_Str",bomb_position);
    thread.nb_bombs--;
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void run(){
  try {
    ArrayList<Integer> bomb_position=new ArrayList<Integer>();
    bomb_position.add(bomb.getX());
    bomb_position.add(bomb.getY());
    Thread.sleep(bomb.getSleepingTime());
    HashMap<Integer,ServerThread> players_threads=Server.getPlayersThreads();
    for (int i=1; i < Server.board.getCols() - 1; i++) {
      int index=i + Server.board.getCols() * bomb.getY();
      Element element=Server.board.getElements().get(index);
      if (element != null) {
        element.setActive(false);
      }
      for (      ServerThread thread : players_threads.values()) {
        if (thread.getPostionX() == i && thread.getPositionY() == bomb.getY()) {
          Server.killPlayer(thread.getClientId());
        }
      }
    }
    for (int i=1; i < Server.board.getRows() - 1; i++) {
      int index=bomb.getX() + Server.board.getCols() * i;
      Element element=Server.board.getElements().get(index);
      if (element != null) {
        element.setActive(false);
      }
      for (      ServerThread thread : players_threads.values()) {
        if (thread.getPostionX() == bomb.getX() && thread.getPositionY() == i) {
          Server.killPlayer(thread.getClientId());
        }
      }
    }
    Server.sendAll("String_Node_Str",bomb_position);
    thread.nb_bombs--;
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
  }
}
Program: 155389
Project: 155389
Buggy source:
private void dropBomb(){
  Bomb bomb=new Bomb();
  bomb.setX(this.position_x);
  bomb.setY(this.position_y);
  bomb.setSleepingTime(this.bomb_sleeping_time);
  ArrayList<Integer> bomb_position=new ArrayList<Integer>();
  bomb_position.add(bomb.getX());
  bomb_position.add(bomb.getY());
  int target_index=bomb.getX() * Server.board.getRows() + bomb.getY();
  Server.board.setElement(target_index,bomb);
  Server.sendAll("String_Node_Str",bomb_position);
  this.nb_bombs++;
  this.burstBomb(bomb,this);
}

Fixed version (ground truth):
private void dropBomb(){
  Bomb bomb=new Bomb();
  bomb.setX(this.position_x);
  bomb.setY(this.position_y);
  bomb.setSleepingTime(this.bomb_sleeping_time);
  ArrayList<Integer> bomb_position=new ArrayList<Integer>();
  bomb_position.add(bomb.getX());
  bomb_position.add(bomb.getY());
  int target_index=bomb.getX() + Server.board.getCols() * bomb.getY();
  Server.board.setElement(target_index,bomb);
  Server.sendAll("String_Node_Str",bomb_position);
  this.nb_bombs++;
  this.burstBomb(bomb,this);
}
Program: 155390
Project: 155390
Buggy source:
public static Map export(Element element) throws Exception {
  if (element == null) {
    return null;
  }
  Map data=new HashMap();
  if (element instanceof Wall && element.active) {
    data.put("String_Node_Str","String_Node_Str");
  }
 else   if (element instanceof Bomb) {
    data.put("String_Node_Str","String_Node_Str");
  }
  if (data.isEmpty()) {
    throw new Exception("String_Node_Str");
  }
  return data;
}

Fixed version (ground truth):
public static Map export(Element element) throws Exception {
  if (element == null) {
    return null;
  }
  Map data=new HashMap();
  if (element instanceof Wall && element.active) {
    data.put("String_Node_Str","String_Node_Str");
  }
 else   if (element instanceof Bomb) {
    data.put("String_Node_Str","String_Node_Str");
  }
  data.put("String_Node_Str",element.isBreakable());
  data.put("String_Node_Str",element.isWalkable());
  if (data.isEmpty()) {
    throw new Exception("String_Node_Str");
  }
  return data;
}
Program: 155391
Project: 155391
Buggy source:
private void move(int diff_x,int diff_y){
  Boolean moving_allowed=false;
  if (Math.abs(diff_x) + Math.abs(diff_y) == 1) {
    moving_allowed=true;
  }
  int target_x=this.position_x + diff_x;
  int target_y=this.position_y + diff_y;
  int target_index=target_x + Server.board.getCols() * target_y;
  Element target_element=Server.board.getElements().get(target_index);
  if (target_element != null && !(target_element.isActive() && target_element.isWalkable())) {
    moving_allowed=false;
  }
  if (moving_allowed) {
    this.position_x+=diff_x;
    this.position_y+=diff_y;
    ArrayList<Integer> move=new ArrayList<Integer>();
    move.add(this.client_id);
    move.add(this.position_x);
    move.add(this.position_y);
    ArrayList<Integer> exceptions=new ArrayList<Integer>();
    exceptions.add(this.client_id);
    Server.sendAllBut("String_Node_Str",move,exceptions);
  }
 else {
    ArrayList<Integer> position=new ArrayList<Integer>();
    position.add(this.client_id);
    position.add(this.position_x);
    position.add(this.position_y);
    this.send("String_Node_Str",position);
  }
}

Fixed version (ground truth):
private void move(int diff_x,int diff_y){
  Boolean moving_allowed=false;
  if (Math.abs(diff_x) + Math.abs(diff_y) == 1) {
    moving_allowed=true;
  }
  int target_x=this.position_x + diff_x;
  int target_y=this.position_y + diff_y;
  int target_index=target_x + Server.board.getCols() * target_y;
  Element target_element=Server.board.getElements().get(target_index);
  if (target_element != null && target_element.isActive() && !target_element.isWalkable()) {
    moving_allowed=false;
  }
  if (moving_allowed) {
    this.position_x+=diff_x;
    this.position_y+=diff_y;
    ArrayList<Integer> move=new ArrayList<Integer>();
    move.add(this.client_id);
    move.add(this.position_x);
    move.add(this.position_y);
    ArrayList<Integer> exceptions=new ArrayList<Integer>();
    exceptions.add(this.client_id);
    Server.sendAllBut("String_Node_Str",move,exceptions);
  }
 else {
    ArrayList<Integer> position=new ArrayList<Integer>();
    position.add(this.client_id);
    position.add(this.position_x);
    position.add(this.position_y);
    this.send("String_Node_Str",position);
  }
}
Program: 155392
Project: 155392
Buggy source:
public static Map export(Element element) throws Exception {
  if (element == null) {
    return null;
  }
  Map data=new HashMap();
  if (element instanceof Wall && element.active) {
    data.put("String_Node_Str","String_Node_Str");
  }
 else   if (element instanceof Bomb) {
    data.put("String_Node_Str","String_Node_Str");
  }
  data.put("String_Node_Str",element.isBreakable());
  data.put("String_Node_Str",element.isWalkable());
  if (data.isEmpty()) {
    throw new Exception("String_Node_Str");
  }
  return data;
}

Fixed version (ground truth):
public static Map export(Element element) throws Exception {
  if (element == null || !element.active) {
    return null;
  }
  Map data=new HashMap();
  if (element instanceof Wall) {
    data.put("String_Node_Str","String_Node_Str");
  }
 else   if (element instanceof Bomb) {
    data.put("String_Node_Str","String_Node_Str");
  }
  data.put("String_Node_Str",element.isBreakable());
  data.put("String_Node_Str",element.isWalkable());
  if (data.isEmpty()) {
    throw new Exception("String_Node_Str");
  }
  return data;
}
Program: 155393
Project: 155393
Buggy source:
public void run(){
  try {
    Thread.sleep(fire_duration);
  }
 catch (  InterruptedException e) {
    System.out.println(e.getMessage());
  }
  for (  int i : add_fire) {
    int pos=fire.indexOf(i);
    if (pos != -1) {
      fire.remove(pos);
    }
  }
}

Fixed version (ground truth):
public void run(){
  try {
    Thread.sleep(fire_duration);
  }
 catch (  InterruptedException e) {
    System.out.println(e.getMessage());
  }
  for (  Integer i : add_fire) {
    fire.remove(i);
  }
}
Program: 155394
Project: 155394
Buggy source:
public void addFire(final List<Integer> add_fire){
  this.fire.addAll(add_fire);
  new Thread(new Runnable(){
    public void run(){
      try {
        Thread.sleep(fire_duration);
      }
 catch (      InterruptedException e) {
        System.out.println(e.getMessage());
      }
      for (      int i : add_fire) {
        int pos=fire.indexOf(i);
        if (pos != -1) {
          fire.remove(pos);
        }
      }
    }
  }
).start();
}

Fixed version (ground truth):
public void addFire(final List<Integer> add_fire){
  this.fire.addAll(add_fire);
  new Thread(new Runnable(){
    public void run(){
      try {
        Thread.sleep(fire_duration);
      }
 catch (      InterruptedException e) {
        System.out.println(e.getMessage());
      }
      for (      Integer i : add_fire) {
        fire.remove(i);
      }
    }
  }
).start();
}
Program: 155395
Project: 155395
Buggy source:
public void setPlayers(Map<Integer,Map> data) throws Exception {
  this.players=new HashMap();
  for (  Map.Entry<Integer,Map> player_data_entry : data.entrySet()) {
    int id=player_data_entry.getKey();
    Map player_data=player_data_entry.getValue();
    Player player=new Player((Integer)player_data.get("String_Node_Str"),(Integer)player_data.get("String_Node_Str"));
    this.players.put(id,player);
    if (player_data.containsKey("String_Node_Str") && (Boolean)player_data.get("String_Node_Str")) {
      this.player_id=id;
    }
  }
  this.started=true;
}

Fixed version (ground truth):
public void setPlayers(Map<String,Map> data) throws Exception {
  this.players=new HashMap();
  for (  Map.Entry<String,Map> player_data_entry : data.entrySet()) {
    int id=Integer.parseInt(player_data_entry.getKey());
    Map player_data=player_data_entry.getValue();
    Player player=new Player(Client.getInstance().convertToInt(player_data.get("String_Node_Str")),Client.getInstance().convertToInt(player_data.get("String_Node_Str")));
    this.players.put(id,player);
    if (player_data.containsKey("String_Node_Str") && (Boolean)player_data.get("String_Node_Str")) {
      this.player_id=id;
    }
  }
  this.started=true;
}
Program: 155396
Project: 155396
Buggy source:
private int convertToInt(Object n) throws Exception {
  if (n instanceof Integer) {
    return (Integer)n;
  }
 else   if (n instanceof Long) {
    return ((Long)n).intValue();
  }
  throw new Exception(n + "String_Node_Str");
}

Fixed version (ground truth):
public int convertToInt(Object n) throws Exception {
  if (n instanceof Integer) {
    return (Integer)n;
  }
 else   if (n instanceof Long) {
    return ((Long)n).intValue();
  }
  throw new Exception(n + "String_Node_Str");
}
Program: 155397
Project: 155397
Buggy source:
private void execute(String command,Object obj){
  System.out.println(command + "String_Node_Str" + obj);
  try {
    if (command.equals("String_Node_Str")) {
      Game.getInstance().getBoard().setCols(this.convertToInt(obj));
    }
 else     if (command.equals("String_Node_Str")) {
      Game.getInstance().getBoard().setData((List<Map>)obj);
    }
 else     if (command.equals("String_Node_Str")) {
      Game.getInstance().setPlayers((Map<Integer,Map>)obj);
    }
 else     if (command.equals("String_Node_Str")) {
      int player_id=this.convertToInt(((List)obj).get(0));
      int x=this.convertToInt(((List)obj).get(1));
      int y=this.convertToInt(((List)obj).get(2));
      Game.getInstance().addPlayer(player_id,x,y);
    }
 else     if (command.equals("String_Node_Str")) {
      Game.getInstance().delPlayer((Integer)obj);
    }
 else     if (command.equals("String_Node_Str")) {
      int x=this.convertToInt(((List)obj).get(0));
      int y=this.convertToInt((Integer)((List)obj).get(1));
      Game.getInstance().getCurrentPlayer().reposition(x,y);
    }
 else     if (command.equals("String_Node_Str")) {
      int player_id=this.convertToInt(((List)obj).get(0));
      int x=this.convertToInt(((List)obj).get(1));
      int y=this.convertToInt(((List)obj).get(2));
      Game.getInstance().getPlayer(player_id).startMove(x,y);
    }
  }
 catch (  Exception e) {
    System.out.println(e.getMessage());
  }
}

Fixed version (ground truth):
private void execute(String command,Object obj){
  System.out.println(command + "String_Node_Str" + obj);
  try {
    if (command.equals("String_Node_Str")) {
      Game.getInstance().getBoard().setCols(this.convertToInt(obj));
    }
 else     if (command.equals("String_Node_Str")) {
      Game.getInstance().getBoard().setData((List<Map>)obj);
    }
 else     if (command.equals("String_Node_Str")) {
      Game.getInstance().setPlayers((Map<String,Map>)obj);
    }
 else     if (command.equals("String_Node_Str")) {
      int player_id=this.convertToInt(((List)obj).get(0));
      int x=this.convertToInt(((List)obj).get(1));
      int y=this.convertToInt(((List)obj).get(2));
      Game.getInstance().addPlayer(player_id,x,y);
    }
 else     if (command.equals("String_Node_Str")) {
      Game.getInstance().delPlayer((Integer)obj);
    }
 else     if (command.equals("String_Node_Str")) {
      int x=this.convertToInt(((List)obj).get(0));
      int y=this.convertToInt((Integer)((List)obj).get(1));
      Game.getInstance().getCurrentPlayer().reposition(x,y);
    }
 else     if (command.equals("String_Node_Str")) {
      int player_id=this.convertToInt(((List)obj).get(0));
      int x=this.convertToInt(((List)obj).get(1));
      int y=this.convertToInt(((List)obj).get(2));
      Game.getInstance().getPlayer(player_id).startMove(x,y);
    }
  }
 catch (  Exception e) {
    System.out.println(e.getMessage());
  }
}
Program: 155398
Project: 155398
Buggy source:
private void move(ArrayList<Integer> move_request){
  ArrayList<Integer> new_position=new ArrayList<Integer>();
  Map<Integer,ArrayList<Integer>> server_response=new HashMap<Integer,ArrayList<Integer>>();
  Boolean moving_allowed=false;
  if (Math.abs(this.position_x - move_request.get(0)) == 1) {
    moving_allowed=true;
    this.position_x+=move_request.get(0);
  }
 else   if (Math.abs(this.position_y - move_request.get(1)) == 1 && this.position_x == move_request.get(0)) {
    moving_allowed=true;
    this.position_y+=move_request.get(1);
  }
  new_position.add(this.position_x);
  new_position.add(this.position_y);
  server_response.put(this.client_id,new_position);
  if (moving_allowed) {
    Server.sendAll("String_Node_Str",server_response);
  }
 else {
    this.send("String_Node_Str",server_response);
  }
}

Fixed version (ground truth):
private void move(int diff_x,int diff_y){
  Boolean moving_allowed=false;
  if (Math.abs(diff_x) + Math.abs(diff_y) == 1) {
    moving_allowed=true;
  }
  if (moving_allowed) {
    this.position_x+=diff_x;
    this.position_y+=diff_y;
    ArrayList<Integer> move=new ArrayList<Integer>();
    move.add(this.client_id);
    move.add(this.position_x);
    move.add(this.position_y);
    ArrayList<Integer> exceptions=new ArrayList<Integer>();
    exceptions.add(this.client_id);
    Server.sendAllBut("String_Node_Str",move,exceptions);
  }
 else {
    ArrayList<Integer> position=new ArrayList<Integer>();
    position.add(this.position_x);
    position.add(this.position_y);
    this.send("String_Node_Str",position);
  }
}
Program: 155399
Project: 155399
Buggy source:
private void execute(String command,Object obj) throws Exception {
  System.out.println(command + "String_Node_Str" + obj);
  try {
    if (command.equals("String_Node_Str")) {
      if (obj instanceof ArrayList) {
        ArrayList<Integer> move_request=(ArrayList)obj;
        if (move_request.size() == 2) {
          this.move(move_request);
        }
      }
    }
 else     if (command.equals("String_Node_Str")) {
      if (this.nb_bombs < this.bombs_allowed) {
        this.dropBomb();
      }
    }
  }
 catch (  Exception e) {
    System.out.println(e.getMessage());
  }
}

Fixed version (ground truth):
private void execute(String command,Object obj) throws Exception {
  System.out.println(command + "String_Node_Str" + obj);
  try {
    if (command.equals("String_Node_Str")) {
      if (obj instanceof ArrayList && ((List)obj).size() == 2) {
        int diff_x=this.convertToInt(((List)obj).get(0));
        int diff_y=this.convertToInt(((List)obj).get(1));
        this.move(diff_x,diff_y);
      }
    }
 else     if (command.equals("String_Node_Str")) {
      if (this.nb_bombs < this.bombs_allowed) {
        this.dropBomb();
      }
    }
  }
 catch (  Exception e) {
    System.out.println(e.getMessage());
  }
}
Program: 155400
Project: 155400
Buggy source:
public void start() throws IOException, ScriptException, SAXException {
  context.launchInterpreter();
}

Fixed version (ground truth):
public void start() throws IOException, ScriptException, SAXException {
  System.err.println("String_Node_Str");
  context.launchInterpreter();
}
Program: 155401
Project: 155401
Buggy source:
public void push(String dtmf) throws ScriptException, IOException, SAXException {
  context.push("String_Node_Str" + dtmf + "String_Node_Str");
  ;
}

Fixed version (ground truth):
public void push(String dtmf) throws ScriptException, IOException, SAXException {
  context.push("String_Node_Str" + dtmf.replaceAll("String_Node_Str","String_Node_Str") + "String_Node_Str");
}
Program: 155402
Project: 155402
Buggy source:
protected final void updateIONApplication(final String domain,final Application application){
  final ClientResponse.Status status=createBuilder(domain).type(MediaType.APPLICATION_JSON_TYPE).put(ClientResponse.class,application).getClientResponseStatus();
  if (!(status == ClientResponse.Status.OK || status == ClientResponse.Status.CREATED)) {
    throw new DeployableException("String_Node_Str" + domain + "String_Node_Str"+ status.getStatusCode()+ "String_Node_Str"+ status.getReasonPhrase()+ "String_Node_Str");
  }
}

Fixed version (ground truth):
protected final void updateIONApplication(final String domain,final Application application){
  final ClientResponse response=createBuilder(domain).type(MediaType.APPLICATION_JSON_TYPE).put(ClientResponse.class,application);
  final ClientResponse.Status status=response.getClientResponseStatus();
  if (!(status == ClientResponse.Status.OK || status == ClientResponse.Status.CREATED)) {
    throw new DeployableException("String_Node_Str" + domain + "String_Node_Str"+ status.getStatusCode()+ "String_Node_Str"+ status.getReasonPhrase()+ "String_Node_Str"+ extractFailureReason(response));
  }
}
Program: 155403
Project: 155403
Buggy source:
public double getTotalAmount(){
  return item.getPrice() * quantity;
}

Fixed version (ground truth):
public float getTotalAmount(){
  return DecimalRounder.roundOff(item.getPrice() * quantity,2);
}
Program: 155404
Project: 155404
Buggy source:
public float getAmount(){
  double amount=item.getPrice() * quantity;
  return Float.parseFloat(Double.toString(amount));
}

Fixed version (ground truth):
public float getAmount(){
  double amount=item.getPrice() * quantity;
  return DecimalRounder.roundOff(Float.parseFloat(Double.toString(amount)),2);
}
Program: 155405
Project: 155405
Buggy source:
public Object[] toArrayObjects(){
  Object[] objs=new Object[6];
  objs[0]=quantity + "String_Node_Str";
  objs[1]=item.getUnit().getName();
  objs[2]=item.getDescription();
  objs[3]=item.getStockNumber();
  objs[4]=item.getPrice() + "String_Node_Str";
  objs[5]=getCost() + "String_Node_Str";
  return objs;
}

Fixed version (ground truth):
public Object[] toArrayObjects(){
  Object[] objs=new Object[6];
  objs[0]=quantity + "String_Node_Str";
  objs[1]=item.getUnit().getName();
  objs[2]=item.getDescription();
  objs[3]=item.getStockNumber();
  objs[4]=getEstimatedUnitCost() + "String_Node_Str";
  objs[5]=getEstimatedCost() + "String_Node_Str";
  return objs;
}
Program: 155406
Project: 155406
Buggy source:
public void addLine(Item item,String q1,String q2,String q3,String q4){
  int quantity1=0;
  int quantity2=0;
  int quantity3=0;
  int quantity4=0;
  try {
    quantity1=Integer.parseInt(q1);
  }
 catch (  Exception e) {
    quantity1=-1;
  }
  try {
    quantity2=Integer.parseInt(q2);
  }
 catch (  Exception e) {
    quantity2=-1;
  }
  try {
    quantity3=Integer.parseInt(q3);
  }
 catch (  Exception e) {
    quantity3=-1;
  }
  try {
    quantity4=Integer.parseInt(q4);
  }
 catch (  Exception e) {
    quantity4=-1;
  }
  addLine(item,quantity1,quantity2,quantity3,quantity4);
}

Fixed version (ground truth):
public void addLine(Item item,String q1,String q2,String q3,String q4){
  int quantity1=0;
  int quantity2=0;
  int quantity3=0;
  int quantity4=0;
  quantity1=checkNum(q1);
  quantity2=checkNum(q2);
  quantity3=checkNum(q3);
  quantity4=checkNum(q4);
  addLine(item,quantity1,quantity2,quantity3,quantity4);
}
Program: 155407
Project: 155407
Buggy source:
public void addLine(Item item,String quantityReq,String quantityIssued,String remarks){
  int req=0;
  int issued=0;
  try {
    req=Integer.parseInt(quantityReq);
    issued=Integer.parseInt(quantityIssued);
  }
 catch (  Exception e) {
  }
  addLine(item,req,issued,remarks);
}

Fixed version (ground truth):
public void addLine(Item item,String quantityReq,String quantityIssued,String remarks){
  int req=0;
  int issued=0;
  try {
    req=checkNum(quantityReq);
    issued=checkNum(quantityIssued);
  }
 catch (  Exception e) {
  }
  addLine(item,req,issued,remarks);
}
Program: 155408
Project: 155408
Buggy source:
@Override public void beforeNewForm(HttpServletRequest request) throws TransactionException {
  this.request=request;
  Object ob=request.getSession().getAttribute("String_Node_Str");
  Object ob2=request.getAttribute("String_Node_Str");
  if (!(ob instanceof APP || ob2 instanceof APP)) {
    String retain=(String)request.getParameter("String_Node_Str");
    if (retain == null) {
      System.out.println("String_Node_Str");
      request.getSession().removeAttribute("String_Node_Str");
      request.removeAttribute("String_Node_Str");
    }
  }
  request.setAttribute("String_Node_Str",dom.getAllDivisionOffice());
  request.setAttribute("String_Node_Str",pm.getAllEmployee());
}

Fixed version (ground truth):
@Override public void beforeNewForm(HttpServletRequest request) throws TransactionException {
  this.request=request;
  Object ob=request.getSession().getAttribute("String_Node_Str");
  Object ob2=request.getAttribute("String_Node_Str");
  if (!(ob instanceof APP || ob2 instanceof APP)) {
    String retain=(String)request.getParameter("String_Node_Str");
    if (retain == null) {
      request.getSession().removeAttribute("String_Node_Str");
      request.removeAttribute("String_Node_Str");
    }
  }
  request.setAttribute("String_Node_Str",dom.getAllDivisionOffice());
  request.setAttribute("String_Node_Str",pm.getAllEmployee());
}
Program: 155409
Project: 155409
Buggy source:
@Override public void process(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  List<Supplier> suppliers=new ArrayList<Supplier>();
  String searchField=request.getParameter("String_Node_Str");
  SupplierSearcher searcher=new SupplierSearcher();
  if (Validator.validField(searchField))   suppliers=searcher.search(searchField);
 else   try {
    suppliers=sManager.getAllSuppliers();
  }
 catch (  TransactionException e) {
    e.printStackTrace();
  }
  request.setAttribute("String_Node_Str",suppliers);
  if (Validator.validField(searchField))   request.setAttribute("String_Node_Str",searchField);
  RequestDispatcher view=request.getRequestDispatcher(SupplierServlet.SEARCH_SUPPLIERS);
  view.forward(request,response);
}

Fixed version (ground truth):
@Override public void process(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  List<Supplier> suppliers=new ArrayList<Supplier>();
  String searchField=request.getParameter("String_Node_Str");
  SupplierSearcher searcher=new SupplierSearcher();
  if (Validator.validField(searchField)) {
    List<Supplier> s=searcher.search(searchField);
    List<Supplier> u=new ArrayList<Supplier>();
    for (    Supplier su : s) {
      if (!u.contains(su))       u.add(su);
    }
    suppliers=u;
  }
 else   try {
    suppliers=sManager.getAllSuppliers();
  }
 catch (  TransactionException e) {
    e.printStackTrace();
  }
  request.setAttribute("String_Node_Str",suppliers);
  if (Validator.validField(searchField))   request.setAttribute("String_Node_Str",searchField);
  RequestDispatcher view=request.getRequestDispatcher(SupplierServlet.SEARCH_SUPPLIERS);
  view.forward(request,response);
}
Program: 155411
Project: 155411
Buggy source:
@Override public void beforeNewForm(HttpServletRequest request) throws TransactionException {
  this.request=request;
  Object ob=request.getSession().getAttribute("String_Node_Str");
  Object ob2=request.getAttribute("String_Node_Str");
  if (!(ob instanceof APP || ob2 instanceof APP)) {
    request.getSession().removeAttribute("String_Node_Str");
    request.removeAttribute("String_Node_Str");
  }
  request.setAttribute("String_Node_Str",dom.getAllDivisionOffice());
  request.setAttribute("String_Node_Str",pm.getAllEmployee());
}

Fixed version (ground truth):
@Override public void beforeNewForm(HttpServletRequest request) throws TransactionException {
  this.request=request;
  Object ob=request.getSession().getAttribute("String_Node_Str");
  Object ob2=request.getAttribute("String_Node_Str");
  if (!(ob instanceof APP || ob2 instanceof APP)) {
    String retain=(String)request.getParameter("String_Node_Str");
    if (retain == null) {
      System.out.println("String_Node_Str");
      request.getSession().removeAttribute("String_Node_Str");
      request.removeAttribute("String_Node_Str");
    }
  }
  request.setAttribute("String_Node_Str",dom.getAllDivisionOffice());
  request.setAttribute("String_Node_Str",pm.getAllEmployee());
}
Program: 155412
Project: 155412
Buggy source:
@Override public void process(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  try {
    if (request.getParameter("String_Node_Str") == null) {
      Object ob=request.getSession().getAttribute("String_Node_Str");
      Object ob2=request.getAttribute("String_Node_Str");
      if (!(ob instanceof PR && ob2 instanceof PR)) {
        request.getSession().removeAttribute("String_Node_Str");
        request.removeAttribute("String_Node_Str");
      }
    }
    beforeForward(request);
    request.getRequestDispatcher(getNewFormJsp()).forward(request,response);
  }
 catch (  TransactionException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void process(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  try {
    if (request.getParameter("String_Node_Str") == null) {
      Object ob=request.getSession().getAttribute("String_Node_Str");
      Object ob2=request.getAttribute("String_Node_Str");
      if (!(ob instanceof PR && ob2 instanceof PR)) {
        String retain=(String)request.getParameter("String_Node_Str");
        if (retain == null) {
          request.getSession().removeAttribute("String_Node_Str");
          request.removeAttribute("String_Node_Str");
        }
      }
    }
    beforeForward(request);
    request.getRequestDispatcher(getNewFormJsp()).forward(request,response);
  }
 catch (  TransactionException e) {
    e.printStackTrace();
  }
}
Program: 155413
Project: 155413
Buggy source:
@Override public void beforeNewForm(HttpServletRequest req) throws TransactionException {
  this.req=req;
  Object ob=req.getSession().getAttribute("String_Node_Str");
  Object ob2=req.getAttribute("String_Node_Str");
  if (!(ob instanceof IE || ob2 instanceof IE)) {
    req.getSession().removeAttribute("String_Node_Str");
    req.removeAttribute("String_Node_Str");
  }
  req.setAttribute("String_Node_Str",pm.getAllEmployee());
  req.setAttribute("String_Node_Str",dom.getAllDivisionOffice());
  req.setAttribute("String_Node_Str",dom.getAllBuildings());
  req.setAttribute("String_Node_Str",pom.getAllModeOfProcurement());
}

Fixed version (ground truth):
@Override public void beforeNewForm(HttpServletRequest req) throws TransactionException {
  this.req=req;
  Object ob=req.getSession().getAttribute("String_Node_Str");
  Object ob2=req.getAttribute("String_Node_Str");
  if (!(ob instanceof IE || ob2 instanceof IE)) {
    String retain=(String)req.getParameter("String_Node_Str");
    if (retain == null) {
      req.getSession().removeAttribute("String_Node_Str");
      req.removeAttribute("String_Node_Str");
    }
  }
  req.setAttribute("String_Node_Str",pm.getAllEmployee());
  req.setAttribute("String_Node_Str",dom.getAllDivisionOffice());
  req.setAttribute("String_Node_Str",dom.getAllBuildings());
  req.setAttribute("String_Node_Str",pom.getAllModeOfProcurement());
}
Program: 155414
Project: 155414
Buggy source:
@Override public void beforeNewForm(HttpServletRequest req) throws TransactionException {
  this.req=req;
  Object ob=req.getSession().getAttribute("String_Node_Str");
  if (!(ob instanceof PO))   req.getSession().removeAttribute("String_Node_Str");
  Object formReq=req.getAttribute("String_Node_Str");
  if (!(formReq instanceof PO))   req.removeAttribute("String_Node_Str");
  req.setAttribute("String_Node_Str",sm.getAllSuppliers());
  req.setAttribute("String_Node_Str",pom.getAllModeOfProcurement());
  req.setAttribute("String_Node_Str",dom.getAllDivisionOffice());
  req.setAttribute("String_Node_Str",pm.getAllEmployee());
}

Fixed version (ground truth):
@Override public void beforeNewForm(HttpServletRequest req) throws TransactionException {
  this.req=req;
  Object ob=req.getSession().getAttribute("String_Node_Str");
  Object formReq=req.getAttribute("String_Node_Str");
  if (!(ob instanceof PO)) {
    String retain=(String)req.getParameter("String_Node_Str");
    if (retain == null) {
      req.getSession().removeAttribute("String_Node_Str");
    }
  }
  if (!(formReq instanceof PO)) {
    String retain=(String)req.getParameter("String_Node_Str");
    if (retain == null) {
      req.removeAttribute("String_Node_Str");
    }
  }
  req.setAttribute("String_Node_Str",sm.getAllSuppliers());
  req.setAttribute("String_Node_Str",pom.getAllModeOfProcurement());
  req.setAttribute("String_Node_Str",dom.getAllDivisionOffice());
  req.setAttribute("String_Node_Str",pm.getAllEmployee());
}
Program: 155415
Project: 155415
Buggy source:
@Override public void beforeNewForm(HttpServletRequest request) throws TransactionException {
  this.request=request;
  Object ob=request.getSession().getAttribute("String_Node_Str");
  Object ob2=request.getAttribute("String_Node_Str");
  if (!(ob instanceof PR || ob2 instanceof PR)) {
    request.getSession().setAttribute("String_Node_Str",new PR());
    request.setAttribute("String_Node_Str",new PR());
  }
  request.setAttribute("String_Node_Str",im.getAllItems());
  request.setAttribute("String_Node_Str",pm.getAllEmployee());
  request.setAttribute("String_Node_Str",dom.getAllDivisionOffice());
}

Fixed version (ground truth):
@Override public void beforeNewForm(HttpServletRequest request) throws TransactionException {
  this.request=request;
  Object ob=request.getSession().getAttribute("String_Node_Str");
  Object ob2=request.getAttribute("String_Node_Str");
  if (!(ob instanceof PR || ob2 instanceof PR)) {
    String retain=(String)request.getParameter("String_Node_Str");
    if (retain == null) {
      request.getSession().setAttribute("String_Node_Str",new PR());
      request.setAttribute("String_Node_Str",new PR());
    }
  }
  request.setAttribute("String_Node_Str",im.getAllItems());
  request.setAttribute("String_Node_Str",pm.getAllEmployee());
  request.setAttribute("String_Node_Str",dom.getAllDivisionOffice());
}
Program: 155416
Project: 155416
Buggy source:
@Override public void beforeNewForm(HttpServletRequest req) throws TransactionException {
  this.req=req;
  Object ob=req.getSession().getAttribute("String_Node_Str");
  Object ob2=req.getAttribute("String_Node_Str");
  if (!(ob instanceof RIS || ob2 instanceof RIS)) {
    req.getSession().removeAttribute("String_Node_Str");
    req.removeAttribute("String_Node_Str");
  }
  req.setAttribute("String_Node_Str",im.getAllItems());
  req.setAttribute("String_Node_Str",dom.getAllDivisionOffice());
  req.setAttribute("String_Node_Str",pm.getAllEmployee());
}

Fixed version (ground truth):
@Override public void beforeNewForm(HttpServletRequest req) throws TransactionException {
  this.req=req;
  Object ob=req.getSession().getAttribute("String_Node_Str");
  Object ob2=req.getAttribute("String_Node_Str");
  if (!(ob instanceof RIS || ob2 instanceof RIS)) {
    String retain=(String)req.getParameter("String_Node_Str");
    if (retain == null) {
      req.getSession().removeAttribute("String_Node_Str");
      req.removeAttribute("String_Node_Str");
    }
  }
  req.setAttribute("String_Node_Str",im.getAllItems());
  req.setAttribute("String_Node_Str",dom.getAllDivisionOffice());
  req.setAttribute("String_Node_Str",pm.getAllEmployee());
}
Program: 155417
Project: 155417
Buggy source:
public float get1stQuarterTotal(){
  float total=0;
  for (  APPLine line : lines)   total+=line.getAmount1();
  return total;
}

Fixed version (ground truth):
public float get1stQuarterTotal(){
  float total=0;
  for (  APPLine line : lines)   total+=line.getAmount1();
  return DecimalRounder.roundOff(total,2);
}
Program: 155418
Project: 155418
Buggy source:
public float get2ndQuarterTotal(){
  float total=0;
  for (  APPLine line : lines)   total+=line.getAmount2();
  return total;
}

Fixed version (ground truth):
public float get2ndQuarterTotal(){
  float total=0;
  for (  APPLine line : lines)   total+=line.getAmount2();
  return DecimalRounder.roundOff(total,2);
}
Program: 155419
Project: 155419
Buggy source:
public float get3rdQuarterTotal(){
  float total=0;
  for (  APPLine line : lines)   total+=line.getAmount3();
  return total;
}

Fixed version (ground truth):
public float get3rdQuarterTotal(){
  float total=0;
  for (  APPLine line : lines)   total+=line.getAmount3();
  return DecimalRounder.roundOff(total,2);
}
Program: 155420
Project: 155420
Buggy source:
public float get4thQuarterTotal(){
  float total=0;
  for (  APPLine line : lines)   total+=line.getAmount4();
  return total;
}

Fixed version (ground truth):
public float get4thQuarterTotal(){
  float total=0;
  for (  APPLine line : lines)   total+=line.getAmount4();
  return DecimalRounder.roundOff(total,2);
}
Program: 155421
Project: 155421
Buggy source:
public float getTotal(){
  float total=0;
  for (  APPLine line : lines)   total+=line.getAmount();
  return total;
}

Fixed version (ground truth):
public float getTotal(){
  float total=0;
  for (  APPLine line : lines)   total+=line.getAmount();
  return DecimalRounder.roundOff(total,2);
}
Program: 155422
Project: 155422
Buggy source:
public Object[] toArrayObject(){
  String description=item.getDescription();
  String stockNumber=item.getStockNumber();
  float price=item.getPrice();
  int quantity1=getQuantityQuarter1();
  int quantity2=getQuantityQuarter2();
  int quantity3=getQuantityQuarter3();
  int quantity4=getQuantityQuarter4();
  int quantity=getQuantity();
  float amount1=getAmount1();
  float amount2=getAmount2();
  float amount3=getAmount3();
  float amount4=getAmount4();
  float amountTotal=amount1 + amount2 + amount3+ amount4;
  return new Object[]{stockNumber,description,item.getUnit().getName(),quantity + "String_Node_Str",price + "String_Node_Str",quantity1 + "String_Node_Str",amount1 + "String_Node_Str",quantity2 + "String_Node_Str",amount2 + "String_Node_Str",quantity3 + "String_Node_Str",amount3 + "String_Node_Str",quantity4 + "String_Node_Str",amount4 + "String_Node_Str",amountTotal + "String_Node_Str"};
}

Fixed version (ground truth):
public Object[] toArrayObject(){
  String description=item.getDescription();
  String stockNumber=item.getStockNumber();
  float price=item.getPrice();
  int quantity1=getQuantityQuarter1();
  int quantity2=getQuantityQuarter2();
  int quantity3=getQuantityQuarter3();
  int quantity4=getQuantityQuarter4();
  int quantity=getQuantity();
  float amount1=getAmount1();
  float amount2=getAmount2();
  float amount3=getAmount3();
  float amount4=getAmount4();
  float amountTotal=getAmount();
  return new Object[]{stockNumber,description,item.getUnit().getName(),quantity + "String_Node_Str",price + "String_Node_Str",quantity1 + "String_Node_Str",amount1 + "String_Node_Str",quantity2 + "String_Node_Str",amount2 + "String_Node_Str",quantity3 + "String_Node_Str",amount3 + "String_Node_Str",quantity4 + "String_Node_Str",amount4 + "String_Node_Str",amountTotal + "String_Node_Str"};
}
Program: 155423
Project: 155423
Buggy source:
public float getAmount(){
  return getAmount1() + getAmount2() + getAmount3()+ getAmount4();
}

Fixed version (ground truth):
public float getAmount(){
  return DecimalRounder.roundOff(getAmount1() + getAmount2() + getAmount3()+ getAmount4(),2);
}
Program: 155424
Project: 155424
Buggy source:
public float getAmount2(){
  return (float)(quantityQuarter2 * item.getPrice());
}

Fixed version (ground truth):
public float getAmount2(){
  return (float)DecimalRounder.roundOff((quantityQuarter2 * item.getPrice()),2);
}
Program: 155425
Project: 155425
Buggy source:
public float getAmount3(){
  return (float)(quantityQuarter3 * item.getPrice());
}

Fixed version (ground truth):
public float getAmount3(){
  return (float)DecimalRounder.roundOff((quantityQuarter3 * item.getPrice()),2);
}
Program: 155426
Project: 155426
Buggy source:
public float getAmount4(){
  return (float)(quantityQuarter4 * item.getPrice());
}

Fixed version (ground truth):
public float getAmount4(){
  return (float)DecimalRounder.roundOff((quantityQuarter4 * item.getPrice()),2);
}
Program: 155427
Project: 155427
Buggy source:
public float getAmount1(){
  return (float)(quantityQuarter1 * item.getPrice());
}

Fixed version (ground truth):
public float getAmount1(){
  return (float)DecimalRounder.roundOff((quantityQuarter1 * item.getPrice()),2);
}
Program: 155429
Project: 155429
Buggy source:
public void setEstimatedUnitCost(long estimatedUnitCost){
  this.estimatedUnitCost=estimatedUnitCost;
}

Fixed version (ground truth):
public void setEstimatedUnitCost(float estimatedUnitCost){
  this.estimatedUnitCost=estimatedUnitCost;
}
Program: 155430
Project: 155430
Buggy source:
public long getEstimatedUnitCost(){
  return estimatedUnitCost;
}

Fixed version (ground truth):
public float getEstimatedUnitCost(){
  return DecimalRounder.roundOff(estimatedUnitCost,2);
}
Program: 155431
Project: 155431
Buggy source:
public long getEstimatedCost(){
  return estimatedUnitCost * quantity;
}

Fixed version (ground truth):
public float getEstimatedCost(){
  return DecimalRounder.roundOff(estimatedUnitCost * quantity,2);
}
Program: 155432
Project: 155432
Buggy source:
@Override public int hashCode(){
  final int prime=31;
  int result=1;
  result=prime * result + (int)(estimatedUnitCost ^ (estimatedUnitCost >>> 32));
  result=prime * result + ((item == null) ? 0 : item.hashCode());
  result=prime * result + quantity;
  return result;
}

Fixed version (ground truth):
@Override public int hashCode(){
  final int prime=31;
  int result=1;
  result=prime * result + Float.floatToIntBits(estimatedUnitCost);
  result=prime * result + ((item == null) ? 0 : item.hashCode());
  result=prime * result + quantity;
  return result;
}