nus-yam/ex-repair huggingface dataset:
Program: 173550
Project: 173550
Buggy source:
@Override public boolean equalsAsOption(PossibleAction action){
  if (!(action instanceof BuyCertificate))   return false;
  BuyCertificate a=(BuyCertificate)action;
  return a.certificate == certificate && a.from == from && a.price == price && a.maximumNumber == maximumNumber;
}

Fixed version (ground truth):
@Override public boolean equalsAsOption(PossibleAction action){
  if (!(action.getClass() == BuyCertificate.class))   return false;
  BuyCertificate a=(BuyCertificate)action;
  return a.company == company && a.from == from && a.price == price && a.maximumNumber == maximumNumber;
}
Program: 173553
Project: 173553
Buggy source:
public void replayGame() throws Exception {
  if (!initialized) {
    throw new ConfigurationException("String_Node_Str");
  }
  GameManager gameManager=loadedGame.getGameManager();
  log.debug("String_Node_Str");
  gameManager.setReloading(true);
  for (  PossibleAction action : gameData.actions) {
    if (!gameManager.processOnReload(action)) {
      log.error("String_Node_Str");
      DisplayBuffer.add(LocalText.getText("String_Node_Str"));
      break;
    }
  }
  gameManager.setReloading(false);
  ReportBuffer.setCommentItems(gameData.userComments);
  gameManager.finishLoading();
}

Fixed version (ground truth):
public void replayGame() throws Exception {
  if (!initialized) {
    throw new ConfigurationException("String_Node_Str");
  }
  GameManager gameManager=loadedGame.getGameManager();
  log.debug("String_Node_Str");
  gameManager.setReloading(true);
  gameManager.getCurrentRound().setPossibleActions();
  for (  PossibleAction action : gameData.actions) {
    if (!gameManager.processOnReload(action)) {
      log.error("String_Node_Str");
      DisplayBuffer.add(LocalText.getText("String_Node_Str"));
      break;
    }
  }
  gameManager.setReloading(false);
  ReportBuffer.setCommentItems(gameData.userComments);
  gameManager.finishLoading();
}
Program: 173554
Project: 173554
Buggy source:
public void finishConfiguration(GameManager gameManager){
  if (gameManager == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  currentTile=gameManager.getTileManager().getTile(preprintedTiled);
  stops=new ArrayList<Stop>(4);
  mStops=new HashMap<Integer,Stop>(4);
  for (  Station s : currentTile.getStations()) {
    Stop c=Stop.create(this,s.getNumber(),s);
    stops.add(c);
    mStops.put(c.getNumber(),c);
  }
}

Fixed version (ground truth):
public void finishConfiguration(GameManager gameManager){
  if (gameManager == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  currentTile=gameManager.getTileManager().getTile(preprintedTileId);
  stops=new ArrayList<Stop>(4);
  mStops=new HashMap<Integer,Stop>(4);
  for (  Station s : currentTile.getStations()) {
    Stop c=Stop.create(this,s.getNumber(),s);
    stops.add(c);
    mStops.put(c.getNumber(),c);
  }
}
Program: 173556
Project: 173556
Buggy source:
public void finishConfiguration(TileManager tileManager) throws ConfigurationException {
  this.tileManager=tileManager;
  for (  Upgrade upgrade : upgrades) {
    Tile tile=tileManager.getTile(upgrade.getTiled());
    if (tile != null) {
      upgrade.setTile(tile);
    }
 else {
      throw new ConfigurationException("String_Node_Str" + upgrade.getTiled() + "String_Node_Str"+ nb);
    }
  }
}

Fixed version (ground truth):
public void finishConfiguration(TileManager tileManager) throws ConfigurationException {
  this.tileManager=tileManager;
  for (  Upgrade upgrade : upgrades) {
    Tile tile=tileManager.getTile(upgrade.getTileId());
    if (tile != null) {
      upgrade.setTile(tile);
    }
 else {
      throw new ConfigurationException("String_Node_Str" + upgrade.getTileId() + "String_Node_Str"+ nb);
    }
  }
}
Program: 173557
Project: 173557
Buggy source:
/** 
 * @param laidTile The laidTile to set.
 */
public void setLaidTile(Tile laidTile){
  this.laidTile=laidTile;
  this.laidTiled=laidTile.getNb();
}

Fixed version (ground truth):
/** 
 * @param laidTile The laidTile to set.
 */
public void setLaidTile(Tile laidTile){
  this.laidTile=laidTile;
  this.laidTileId=laidTile.getNb();
}
Program: 173558
Project: 173558
Buggy source:
@Override public boolean equalsAsOption(PossibleAction action){
  if (!(action instanceof LayTile))   return false;
  LayTile a=(LayTile)action;
  return (a.locationNames == null && locationNames == null || a.locationNames.equals(locationNames)) && a.type == type && a.tileColours == tileColours && a.tiles == tiles && a.specialProperty == specialProperty;
}

Fixed version (ground truth):
@Override public boolean equalsAsOption(PossibleAction action){
  if (!(action.getClass() == LayTile.class))   return false;
  LayTile a=(LayTile)action;
  return (Objects.equal(a.locationNames,locationNames) && a.type == type && Objects.equal(a.tiles,tiles) && Objects.equal(a.specialProperty,specialProperty));
}
Program: 173560
Project: 173560
Buggy source:
@Override public boolean equalsAsAction(PossibleAction action){
  if (!(action instanceof LayTile))   return false;
  LayTile a=(LayTile)action;
  return (a.laidTiled == laidTiled && a.chosenHexName.equals(chosenHexName) && a.orientation == orientation && (a.relaidBaseTokensString == null && relaidBaseTokensString == null || a.relaidBaseTokensString.equals(relaidBaseTokensString)));
}

Fixed version (ground truth):
@Override public boolean equalsAsAction(PossibleAction action){
  if (!(action instanceof LayTile))   return false;
  LayTile a=(LayTile)action;
  return (a.laidTileId == laidTileId && a.chosenHexName.equals(chosenHexName) && a.orientation == orientation && (a.relaidBaseTokensString == null && relaidBaseTokensString == null || a.relaidBaseTokensString.equals(relaidBaseTokensString)));
}
Program: 173562
Project: 173562
Buggy source:
private void init(GameUIManager gameUIManager){
  TileManager tmgr=gameUIManager.getGameManager().getTileManager();
  Tile tile;
  Field label;
  BufferedImage hexImage;
  ImageIcon hexIcon;
  int picId;
  List<Integer> tileIds=tmgr.getTileds();
  log.debug("String_Node_Str" + tileIds.size() + "String_Node_Str");
  for (  int tileId : tileIds) {
    if (tileId <= 0)     continue;
    tile=tmgr.getTile(tileId);
    picId=tile.getPictureId();
    hexImage=GameUIManager.getImageLoader().getTile(picId,10);
    hexIcon=new ImageIcon(hexImage);
    hexIcon.setImage(hexIcon.getImage().getScaledInstance((int)(hexIcon.getIconWidth() * GUIHex.NORMAL_SCALE * 0.8),(int)(hexIcon.getIconHeight() * GUIHex.NORMAL_SCALE * 0.8),Image.SCALE_SMOOTH));
    label=new Field(tile,hexIcon,Field.CENTER);
    label.setVerticalTextPosition(Field.BOTTOM);
    label.setHorizontalTextPosition(Field.CENTER);
    label.setVisible(true);
    getContentPane().add(label);
    shownTiles.add(tile);
    labels.add(label);
  }
}

Fixed version (ground truth):
private void init(GameUIManager gameUIManager){
  TileManager tmgr=gameUIManager.getGameManager().getTileManager();
  Tile tile;
  Field label;
  BufferedImage hexImage;
  ImageIcon hexIcon;
  int picId;
  List<Integer> tileIds=tmgr.getTileIds();
  log.debug("String_Node_Str" + tileIds.size() + "String_Node_Str");
  for (  int tileId : tileIds) {
    if (tileId <= 0)     continue;
    tile=tmgr.getTile(tileId);
    picId=tile.getPictureId();
    hexImage=GameUIManager.getImageLoader().getTile(picId,10);
    hexIcon=new ImageIcon(hexImage);
    hexIcon.setImage(hexIcon.getImage().getScaledInstance((int)(hexIcon.getIconWidth() * GUIHex.NORMAL_SCALE * 0.8),(int)(hexIcon.getIconHeight() * GUIHex.NORMAL_SCALE * 0.8),Image.SCALE_SMOOTH));
    label=new Field(tile,hexIcon,Field.CENTER);
    label.setVerticalTextPosition(Field.BOTTOM);
    label.setHorizontalTextPosition(Field.CENTER);
    label.setVisible(true);
    getContentPane().add(label);
    shownTiles.add(tile);
    labels.add(label);
  }
}
Program: 173564
Project: 173564
Buggy source:
private void paintOverlay(Graphics2D g2){
  if (provisionalGUITile != null) {
    if (hexMap.isTilePainted(provisionalGUITile.getTiled())) {
      provisionalGUITile.paintTile(g2,center.x,center.y);
    }
  }
 else {
    if (hexMap.isTilePainted(currentGUITile.getTiled())) {
      currentGUITile.paintTile(g2,center.x,center.y);
    }
  }
}

Fixed version (ground truth):
private void paintOverlay(Graphics2D g2){
  if (provisionalGUITile != null) {
    if (hexMap.isTilePainted(provisionalGUITile.getTileId())) {
      provisionalGUITile.paintTile(g2,center.x,center.y);
    }
  }
 else {
    if (hexMap.isTilePainted(currentGUITile.getTileId())) {
      currentGUITile.paintTile(g2,center.x,center.y);
    }
  }
}
Program: 173565
Project: 173565
Buggy source:
public void setHexModel(MapHex model){
  this.model=model;
  currentTile=model.getCurrentTile();
  hexName=model.getId();
  currentTiled=model.getCurrentTile().getNb();
  currentTileOrientation=model.getCurrentTileRotation();
  currentGUITile=new GUITile(currentTiled,this);
  currentGUITile.setRotation(currentTileOrientation);
  toolTip=null;
  model.addObserver(this);
}

Fixed version (ground truth):
public void setHexModel(MapHex model){
  this.model=model;
  currentTile=model.getCurrentTile();
  hexName=model.getId();
  currentTileId=model.getCurrentTile().getNb();
  currentTileOrientation=model.getCurrentTileRotation();
  currentGUITile=new GUITile(currentTileId,this);
  currentGUITile.setRotation(currentTileOrientation);
  toolTip=null;
  model.addObserver(this);
}
Program: 173566
Project: 173566
Buggy source:
public void update(String notification){
  String[] elements=notification.split("String_Node_Str");
  currentTiled=Integer.parseInt(elements[0]);
  currentTileOrientation=Integer.parseInt(elements[1]);
  currentGUITile=new GUITile(currentTiled,this);
  currentGUITile.setRotation(currentTileOrientation);
  currentTile=currentGUITile.getTile();
  hexMap.repaint(getBounds());
  provisionalGUITile=null;
}

Fixed version (ground truth):
public void update(String notification){
  String[] elements=notification.split("String_Node_Str");
  currentTileId=Integer.parseInt(elements[0]);
  currentTileOrientation=Integer.parseInt(elements[1]);
  currentGUITile=new GUITile(currentTileId,this);
  currentGUITile.setRotation(currentTileOrientation);
  currentTile=currentGUITile.getTile();
  hexMap.repaint(getBounds());
  provisionalGUITile=null;
}
Program: 173567
Project: 173567
Buggy source:
protected void setupHexesGUI(){
  hexes=new ArrayList<GUIHex>();
  hexArray=mapManager.getHexes();
  MapHex mh;
  h=new GUIHex[hexArray.length][hexArray[0].length];
  for (int i=minX; i < hexArray.length; i++) {
    for (int j=minY; j < hexArray[0].length; j++) {
      mh=hexArray[i][j];
      if (mh != null) {
        GUIHex hex=new GUIHex(this,calcXCoordinates(mh.getColumn(),tileXOffset),calcYCoordinates(mh.getRow(),tileYOffset),scale,i - minX + 1,j - minY + 1);
        hex.setHexModel(mh);
        hex.originalTiled=hex.currentTiled;
        hexesByName.put(mh.getId(),hex);
        h[i][j]=hex;
        hexes.add(hex);
      }
    }
  }
}

Fixed version (ground truth):
protected void setupHexesGUI(){
  hexes=new ArrayList<GUIHex>();
  hexArray=mapManager.getHexes();
  MapHex mh;
  h=new GUIHex[hexArray.length][hexArray[0].length];
  for (int i=minX; i < hexArray.length; i++) {
    for (int j=minY; j < hexArray[0].length; j++) {
      mh=hexArray[i][j];
      if (mh != null) {
        GUIHex hex=new GUIHex(this,calcXCoordinates(mh.getColumn(),tileXOffset),calcYCoordinates(mh.getRow(),tileYOffset),scale,i - minX + 1,j - minY + 1);
        hex.setHexModel(mh);
        hex.originalTileId=hex.currentTileId;
        hexesByName.put(mh.getId(),hex);
        h[i][j]=hex;
        hexes.add(hex);
      }
    }
  }
}
Program: 173568
Project: 173568
Buggy source:
public void startShareSellingRound(Player player,int cashToRaise,PublicCompany cashNeedingCompany,boolean problemDumpOtherCompanies){
  interruptedRound=getCurrentRound();
  createRound(shareSellingRoundClass,"String_Node_Str").start(interruptedRound,player,cashToRaise,cashNeedingCompany,!problemDumpOtherCompanies || forcedSellingCompanyDump);
}

Fixed version (ground truth):
public void startShareSellingRound(Player player,int cashToRaise,PublicCompany cashNeedingCompany,boolean problemDumpOtherCompanies){
  interruptedRound=getCurrentRound();
  String id="String_Node_Str" + interruptedRound.getId() + "String_Node_Str"+ cashNeedingCompany.getId();
  createRound(shareSellingRoundClass,id).start(interruptedRound,player,cashToRaise,cashNeedingCompany,!problemDumpOtherCompanies || forcedSellingCompanyDump);
}
Program: 173571
Project: 173571
Buggy source:
public void skip(){
  log.debug("String_Node_Str" + stepObject.value());
  nextStep();
}

Fixed version (ground truth):
public void skip(NullAction action){
  log.debug("String_Node_Str" + stepObject.value());
  ChangeStack.start(this,action);
  nextStep();
}
Program: 173573
Project: 173573
Buggy source:
@Override public boolean equalsAsOption(PossibleAction action){
  if (!(action instanceof BuyTrain))   return false;
  BuyTrain a=(BuyTrain)action;
  return a.getTrain() == getTrain() && a.from == from && a.fixedCost == fixedCost && a.trainsForExchange == trainsForExchange;
}

Fixed version (ground truth):
@Override public boolean equalsAsOption(PossibleAction action){
  if (!(action instanceof BuyTrain))   return false;
  BuyTrain a=(BuyTrain)action;
  return a.getTrain() == getTrain() && a.from == from && a.fixedCost == fixedCost && Objects.equal(a.trainsForExchange,trainsForExchange);
}
Program: 173574
Project: 173574
Buggy source:
@Override public String toString(){
  StringBuffer b=new StringBuffer();
  b.append(company.getId());
  if (train != null) {
    b.append("String_Node_Str").append(typeName).append("String_Node_Str");
  }
 else {
    b.append("String_Node_Str");
  }
  b.append("String_Node_Str").append(trainUniqueId).append("String_Node_Str").append(from.getId());
  if (fixedCost > 0) {
    b.append("String_Node_Str").append(Currency.format(train,fixedCost));
  }
 else {
    b.append("String_Node_Str");
  }
  if (specialProperty != null) {
    b.append("String_Node_Str").append(specialProperty.getOriginalCompany().getId());
  }
  if (isForExchange()) {
    b.append(forcedExchange ? "String_Node_Str" : "String_Node_Str");
  }
  if (presidentMustAddCash) {
    b.append("String_Node_Str").append(Currency.format(train,presidentCashToAdd));
  }
 else   if (presidentMayAddCash) {
    b.append("String_Node_Str").append(Currency.format(train,presidentCashToAdd));
  }
  if (acted) {
    b.append("String_Node_Str").append(Currency.format(train,pricePaid));
    if (addedCash > 0)     b.append("String_Node_Str" + Currency.format(train,addedCash));
    if (exchangedTrain != null)     b.append("String_Node_Str" + exchangedTrain.getId() + "String_Node_Str");
  }
  return b.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  StringBuffer b=new StringBuffer();
  b.append(company.getId());
  if (train != null) {
    b.append("String_Node_Str").append(typeName).append("String_Node_Str");
  }
 else {
    b.append("String_Node_Str");
  }
  b.append("String_Node_Str").append(trainUniqueId).append("String_Node_Str").append(from.getId());
  if (fixedCost > 0) {
    b.append("String_Node_Str").append(Currency.format(company,fixedCost));
  }
 else {
    b.append("String_Node_Str");
  }
  if (specialProperty != null) {
    b.append("String_Node_Str").append(specialProperty.getOriginalCompany().getId());
  }
  if (isForExchange()) {
    b.append(forcedExchange ? "String_Node_Str" : "String_Node_Str");
  }
  if (presidentMustAddCash) {
    b.append("String_Node_Str").append(Currency.format(company,presidentCashToAdd));
  }
 else   if (presidentMayAddCash) {
    b.append("String_Node_Str").append(Currency.format(company,presidentCashToAdd));
  }
  if (acted) {
    b.append("String_Node_Str").append(Currency.format(company,pricePaid));
    if (addedCash > 0)     b.append("String_Node_Str" + Currency.format(company,addedCash));
    if (exchangedTrain != null)     b.append("String_Node_Str" + exchangedTrain.getId() + "String_Node_Str");
  }
  return b.toString();
}
Program: 173575
Project: 173575
Buggy source:
@Override public boolean equalsAsOption(PossibleAction action){
  if (!(action instanceof DiscardTrain))   return false;
  DiscardTrain a=(DiscardTrain)action;
  return a.ownedTrains == ownedTrains && a.company == company;
}

Fixed version (ground truth):
@Override public boolean equalsAsOption(PossibleAction action){
  if (!(action instanceof DiscardTrain))   return false;
  DiscardTrain a=(DiscardTrain)action;
  return a.ownedTrains.equals(ownedTrains) && a.company == company;
}
Program: 173576
Project: 173576
Buggy source:
@Override public boolean equalsAsOption(PossibleAction action){
  if (!(action.getClass() == LayTile.class))   return false;
  LayTile a=(LayTile)action;
  return (Objects.equal(a.locationNames,locationNames) && a.type == type && Objects.equal(a.tiles,tiles) && Objects.equal(a.specialProperty,specialProperty));
}

Fixed version (ground truth):
@Override public boolean equalsAsOption(PossibleAction action){
  if (!(action.getClass() == LayTile.class))   return false;
  LayTile a=(LayTile)action;
  return (Objects.equal(a.locationNames,locationNames) && (Objects.equal(a.tiles,tiles) && specialProperty == null || Objects.equal(a.specialProperty,specialProperty) && specialProperty != null));
}
Program: 173577
Project: 173577
Buggy source:
@Override public boolean equalsAsOption(PossibleAction action){
  if (!(action instanceof MapCorrectionAction))   return false;
  MapCorrectionAction a=(MapCorrectionAction)action;
  return (a.step == this.step);
}

Fixed version (ground truth):
@Override public boolean equalsAsOption(PossibleAction action){
  if (!(action instanceof MapCorrectionAction))   return false;
  return true;
}
Program: 173578
Project: 173578
Buggy source:
public void initTokens(Set<BaseToken> tokens){
  allTokens=ImmutableSortedSet.copyOf(tokens);
}

Fixed version (ground truth):
/** 
 * Initialize a set of tokens
 */
public void initTokens(Set<BaseToken> tokens){
  allTokens=ImmutableSortedSet.copyOf(tokens);
  Portfolio.moveAll(allTokens,getParent());
}
Program: 173579
Project: 173579
Buggy source:
/** 
 * Used to identify portfolios on reload
 */
@Deprecated public String getUniqueName(){
  return getParent().getClass().getSimpleName() + "String_Node_Str" + getParent().getId();
}

Fixed version (ground truth):
/** 
 * Used to identify portfolios on reload TODO: Remove that in the future
 */
@Deprecated public String getUniqueName(){
  if (getParent() instanceof BankPortfolio) {
    return Bank.class.getSimpleName() + "String_Node_Str" + getParent().getId();
  }
  return getParent().getClass().getSimpleName() + "String_Node_Str" + getParent().getId();
}
Program: 173580
Project: 173580
Buggy source:
@Override public String toText(){
  Player president=company.getPresident();
  if (president == null)   return "String_Node_Str";
 else   return company.getPresident().getNameAndPriority();
}

Fixed version (ground truth):
@Override public String toText(){
  Player president=getParent().getPresident();
  if (president == null)   return "String_Node_Str";
 else   return getParent().getPresident().getNameAndPriority();
}
Program: 173581
Project: 173581
Buggy source:
@Override public void skip(){
  if (activeSpPrivC.value()) {
    log.debug("String_Node_Str");
    ChangeStack.start(this,null);
    activeSpPrivC.set(false);
    stepObject.set(storeActiveStep);
  }
 else {
    super.skip();
  }
}

Fixed version (ground truth):
@Override public void skip(NullAction action){
  if (activeSpPrivC.value()) {
    log.debug("String_Node_Str");
    ChangeStack.start(this,null);
    activeSpPrivC.set(false);
    stepObject.set(storeActiveStep);
  }
 else {
    super.skip(action);
  }
}
Program: 173582
Project: 173582
Buggy source:
/** 
 * Is the company completely sold out? This method should return true only if the share price should move up at the end of a stock round. Since 1851 (jan 2008) interpreted as: no share is owned either by the Bank or by the company's own Treasury.
 * @return true if the share price can move up.
 */
public boolean isSoldOut(){
  Owner owner;
  for (  PublicCertificate cert : certificates.view()) {
    owner=cert.getOwner();
    if (owner instanceof Bank || owner == cert.getCompany()) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Is the company completely sold out? This method should return true only if the share price should move up at the end of a stock round. Since 1851 (jan 2008) interpreted as: no share is owned either by the Bank or by the company's own Treasury.
 * @return true if the share price can move up.
 */
public boolean isSoldOut(){
  Owner owner;
  for (  PublicCertificate cert : certificates.view()) {
    owner=cert.getOwner();
    if (owner instanceof BankPortfolio || owner == cert.getCompany()) {
      return false;
    }
  }
  return true;
}
Program: 173583
Project: 173583
Buggy source:
public void move(Owner from,int amount,Owner to){
  Preconditions.checkArgument(from != to,"String_Node_Str" + to);
  Preconditions.checkArgument(amount > 0,"String_Node_Str");
  Wallet<T> newWallet=wm.getWallet(type,to);
  Preconditions.checkArgument(newWallet != null,"String_Node_Str" + to);
  new WalletChange<T>(newWallet,type.cast(this),amount);
  if (from != wm.getUnkownOwner()) {
    Wallet<T> oldWallet=wm.getWallet(type,from);
    Preconditions.checkArgument(oldWallet != null,"String_Node_Str" + from);
    new WalletChange<T>(oldWallet,type.cast(this),-amount);
  }
}

Fixed version (ground truth):
public void move(Owner from,int amount,Owner to){
  Preconditions.checkArgument(from != to,"String_Node_Str" + to);
  Preconditions.checkArgument(amount >= 0,"String_Node_Str");
  Wallet<T> newWallet=wm.getWallet(type,to);
  Preconditions.checkArgument(newWallet != null,"String_Node_Str" + to);
  new WalletChange<T>(newWallet,type.cast(this),amount);
  if (from != wm.getUnkownOwner()) {
    Wallet<T> oldWallet=wm.getWallet(type,from);
    Preconditions.checkArgument(oldWallet != null,"String_Node_Str" + from);
    new WalletChange<T>(oldWallet,type.cast(this),-amount);
  }
}
Program: 173585
Project: 173585
Buggy source:
public int storeObject(String typeName,Object object){
  Integer id=storageIds.get(typeName);
  if (id == null)   id=0;
  objectStorage.put(typeName + id,object);
  storageIds.put(typeName,id + 1);
  log.debug("String_Node_Str" + typeName + "String_Node_Str"+ id);
  return id;
}

Fixed version (ground truth):
public int storeObject(String typeName,Object object){
  Integer id=storageIds.get(typeName);
  if (id == null)   id=0;
  objectStorage.put(typeName + id,object);
  storageIds.put(typeName,id + 1);
  return id;
}
Program: 173586
Project: 173586
Buggy source:
public SpecialProperty(){
  gameManager=GameManager.getInstance();
  uniqueId=gameManager.storeObject(STORAGE_NAME,this);
}

Fixed version (ground truth):
public SpecialProperty(){
  gameManager=GameManager.getInstance();
  uniqueId=gameManager.storeObject(STORAGE_NAME,this) + 1;
}
Program: 173587
Project: 173587
Buggy source:
public static SpecialPropertyI getByUniqueId(int i){
  return (SpecialPropertyI)GameManager.getInstance().retrieveObject(STORAGE_NAME,i);
}

Fixed version (ground truth):
public static SpecialPropertyI getByUniqueId(int id){
  id-=1;
  return (SpecialPropertyI)GameManager.getInstance().retrieveObject(STORAGE_NAME,id);
}
Program: 173588
Project: 173588
Buggy source:
/** 
 * Modify the revenue calculation for the civil war by removing the shortest train
 */
public boolean modifyCalculator(RevenueAdapter revenueAdapter){
  if (!isCivilWar())   return false;
  List<NetworkTrain> trains=revenueAdapter.getTrains();
  if (trains.size() == 0)   return false;
  Collections.sort(trains);
  trains.remove(0);
  return true;
}

Fixed version (ground truth):
/** 
 * Modify the revenue calculation for the civil war by removing the shortest train
 */
public boolean modifyCalculator(RevenueAdapter revenueAdapter){
  if (revenueAdapter.getCompany() != this)   return false;
  if (!isCivilWar())   return false;
  List<NetworkTrain> trains=revenueAdapter.getTrains();
  if (trains.size() == 0)   return false;
  Collections.sort(trains);
  trains.remove(0);
  return true;
}
Program: 173589
Project: 173589
Buggy source:
public void resetStorage(){
  objectStorage=new HashMap<Integer,Object>();
  storageId=0;
}

Fixed version (ground truth):
public void resetStorage(){
  objectStorage=new HashMap<String,Object>();
  storageIds=new HashMap<String,Integer>();
}
Program: 173590
Project: 173590
Buggy source:
public Object retrieveObject(int id){
  return objectStorage.get(id);
}

Fixed version (ground truth):
public Object retrieveObject(String typeName,int id){
  return objectStorage.get(typeName + id);
}
Program: 173591
Project: 173591
Buggy source:
public int storeObject(Object object){
  objectStorage.put(storageId++,object);
  return storageId;
}

Fixed version (ground truth):
public int storeObject(String typeName,Object object){
  Integer id=storageIds.get(typeName);
  if (id == null)   id=0;
  objectStorage.put(typeName + id,object);
  storageIds.put(typeName,id + 1);
  log.debug("String_Node_Str" + typeName + "String_Node_Str"+ id);
  return id;
}
Program: 173592
Project: 173592
Buggy source:
/** 
 * store element in storage
 * @param object to store
 * @return unique id of the object in the storage TODO move to a better place
 */
public int storeObject(Object object);

Fixed version (ground truth):
/** 
 * store element in storage
 * @param name to identify the type of the object to retrieve
 * @param object to store
 * @return unique id of the object in the storage TODO move to a better place
 */
public int storeObject(String typeName,Object object);
Program: 173593
Project: 173593
Buggy source:
/** 
 * ask storage for object
 * @param identifier in storage
 * @return object stored under the id (null if none is stored)TODO move to a better place
 */
public Object retrieveObject(int id);

Fixed version (ground truth):
/** 
 * ask storage for object
 * @param name to identify the type of the object to retrieve
 * @param identifier in storage
 * @return object stored under the id (null if none is stored)TODO move to a better place
 */
public Object retrieveObject(String typeName,int id);
Program: 173594
Project: 173594
Buggy source:
public Token(){
  uniqueId=ID_PREFIX + GameManager.getInstance().storeObject(this);
}

Fixed version (ground truth):
public Token(){
  uniqueId=STORAGE_NAME + "String_Node_Str" + GameManager.getInstance().storeObject(STORAGE_NAME,this);
}
Program: 173595
Project: 173595
Buggy source:
public static TokenI getByUniqueId(String id){
  int i=Integer.valueOf(id.replace(ID_PREFIX,"String_Node_Str"));
  return (Token)GameManager.getInstance().retrieveObject(i);
}

Fixed version (ground truth):
public static TokenI getByUniqueId(String id){
  int i=Integer.valueOf(id.replace(STORAGE_NAME + "String_Node_Str","String_Node_Str"));
  return (Token)GameManager.getInstance().retrieveObject(STORAGE_NAME,i);
}
Program: 173596
Project: 173596
Buggy source:
public SpecialProperty(){
  gameManager=GameManager.getInstance();
  uniqueId=gameManager.storeObject(this);
}

Fixed version (ground truth):
public SpecialProperty(){
  gameManager=GameManager.getInstance();
  uniqueId=gameManager.storeObject(STORAGE_NAME,this);
}
Program: 173597
Project: 173597
Buggy source:
public static SpecialPropertyI getByUniqueId(int i){
  return (SpecialPropertyI)GameManager.getInstance().retrieveObject(i);
}

Fixed version (ground truth):
public static SpecialPropertyI getByUniqueId(int i){
  return (SpecialPropertyI)GameManager.getInstance().retrieveObject(STORAGE_NAME,i);
}
Program: 173598
Project: 173598
Buggy source:
protected void setUp() throws Exception {
  super.setUp();
  String reportFilename=gamePath + File.separator + gameName+ "String_Node_Str"+ Config.get("String_Node_Str");
  File reportFile=new File(reportFilename);
  if (reportFile.exists()) {
    log.debug("String_Node_Str" + reportFilename);
    Scanner reportScanner=new Scanner(new FileReader(reportFilename));
    expectedReport=new ArrayList<String>();
    while (reportScanner.hasNext())     expectedReport.add(reportScanner.nextLine());
    reportScanner.close();
  }
 else {
    log.debug("String_Node_Str" + reportFilename);
  }
  String gameFilename=gamePath + File.separator + gameName+ "String_Node_Str"+ Config.get("String_Node_Str");
  File gameFile=new File(gameFilename);
  if (gameFile.exists()) {
    log.debug("String_Node_Str" + gameFilename);
    Game testGame=Game.load(gameFilename);
    if (testGame != null)     testReport=ReportBuffer.getAsList();
  }
 else {
    log.error("String_Node_Str" + gameFilename);
  }
}

Fixed version (ground truth):
protected void setUp() throws Exception {
  super.setUp();
  String reportFilename=gamePath + File.separator + gameName+ "String_Node_Str"+ Config.get("String_Node_Str");
  File reportFile=new File(reportFilename);
  if (reportFile.exists()) {
    log.debug("String_Node_Str" + reportFilename);
    Scanner reportScanner=new Scanner(new FileReader(reportFilename));
    expectedReport=new ArrayList<String>();
    while (reportScanner.hasNext())     expectedReport.add(reportScanner.nextLine());
    reportScanner.close();
  }
 else {
    log.debug("String_Node_Str" + reportFilename);
  }
  String gameFilename=gamePath + File.separator + gameName+ "String_Node_Str"+ Config.get("String_Node_Str");
  File gameFile=new File(gameFilename);
  if (gameFile.exists()) {
    log.debug("String_Node_Str" + gameFilename);
    Game testGame=Game.load(gameFilename);
    if (testGame != null) {
      testReport=ReportBuffer.getAsList();
      NDC.clear();
    }
  }
 else {
    log.error("String_Node_Str" + gameFilename);
  }
}
Program: 173599
Project: 173599
Buggy source:
private static void prepareGameReport(File gameFile,String reportFilename){
  Game game=null;
  if (gameFile.exists())   System.out.println("String_Node_Str" + gameFile.getAbsolutePath());
  game=Game.load(gameFile.getAbsolutePath());
  if (game != null) {
    List<String> report=ReportBuffer.getAsList();
    PrintWriter reportFile=null;
    try {
      reportFile=new PrintWriter(reportFilename);
    }
 catch (    IOException e) {
      System.err.print("String_Node_Str" + reportFilename + "String_Node_Str");
    }
    if (reportFile != null) {
      for (      String msg : report) {
        reportFile.println(msg);
      }
      reportFile.close();
      System.out.println("String_Node_Str" + reportFilename);
    }
  }
}

Fixed version (ground truth):
private static void prepareGameReport(File gameFile,String reportFilename){
  Game game=null;
  if (gameFile.exists())   System.out.println("String_Node_Str" + gameFile.getAbsolutePath());
  game=Game.load(gameFile.getAbsolutePath());
  if (game != null) {
    List<String> report=ReportBuffer.getAsList();
    NDC.clear();
    PrintWriter reportFile=null;
    try {
      reportFile=new PrintWriter(reportFilename);
    }
 catch (    IOException e) {
      System.err.print("String_Node_Str" + reportFilename + "String_Node_Str");
    }
    if (reportFile != null) {
      for (      String msg : report) {
        reportFile.println(msg);
      }
      reportFile.close();
      System.out.println("String_Node_Str" + reportFilename);
    }
  }
}
Program: 173600
Project: 173600
Buggy source:
public void removeTrain(TrainI train){
  trains.remove(train);
  trainsPerType.get(train.getPreviousType()).remove(train);
  trainsPerCertType.get(train.getCertType()).remove(train);
  train.setHolder(null);
  trainsModel.update();
}

Fixed version (ground truth):
/** 
 * Low-level method, only to be called by Move objects 
 */
private void removeTrain(TrainI train){
  trains.remove(train);
  trainsPerType.get(train.getPreviousType()).remove(train);
  trainsPerCertType.get(train.getCertType()).remove(train);
  train.setHolder(null);
  trainsModel.update();
}
Program: 173601
Project: 173601
Buggy source:
/** 
 * Add a special property. Used to make special properties independent of the private company that originally held it.
 * @param property The special property object to add.
 * @return True if successful.
 */
public boolean addSpecialProperty(SpecialPropertyI property,int position){
  if (specialProperties == null) {
    specialProperties=new ArrayList<SpecialPropertyI>(2);
  }
  boolean result=Util.addToList(specialProperties,property,position);
  if (!result)   return false;
  property.setHolder(this);
  if (owner instanceof PublicCompanyI && property instanceof LocatedBonus) {
    PublicCompanyI company=(PublicCompanyI)owner;
    LocatedBonus locBonus=(LocatedBonus)property;
    Bonus bonus=new Bonus(company,locBonus.getName(),locBonus.getValue(),locBonus.getLocations());
    company.addBonus(bonus);
    ReportBuffer.add(LocalText.getText("String_Node_Str",owner.getName(),locBonus.getName(),Bank.format(locBonus.getValue()),locBonus.getLocationNameString()));
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Add a special property. Used to make special properties independent of the private company that originally held it. Low-level method, only to be called by Move objects.
 * @param property The special property object to add.
 * @return True if successful.
 */
private boolean addSpecialProperty(SpecialPropertyI property,int position){
  if (specialProperties == null) {
    specialProperties=new ArrayList<SpecialPropertyI>(2);
  }
  boolean result=Util.addToList(specialProperties,property,position);
  if (!result)   return false;
  property.setHolder(this);
  if (owner instanceof PublicCompanyI && property instanceof LocatedBonus) {
    PublicCompanyI company=(PublicCompanyI)owner;
    LocatedBonus locBonus=(LocatedBonus)property;
    Bonus bonus=new Bonus(company,locBonus.getName(),locBonus.getValue(),locBonus.getLocations());
    company.addBonus(bonus);
    ReportBuffer.add(LocalText.getText("String_Node_Str",owner.getName(),locBonus.getName(),Bank.format(locBonus.getValue()),locBonus.getLocationNameString()));
  }
  return result;
}
Program: 173602
Project: 173602
Buggy source:
/** 
 * Remove an object.
 * @param object The object to remove.
 * @return True if successful.
 */
public boolean removeObject(Moveable object){
  if (object instanceof PublicCertificateI) {
    removeCertificate((PublicCertificateI)object);
    return true;
  }
 else   if (object instanceof PrivateCompanyI) {
    removePrivate((PrivateCompanyI)object);
    return true;
  }
 else   if (object instanceof TrainI) {
    removeTrain((TrainI)object);
    return true;
  }
 else   if (object instanceof SpecialPropertyI) {
    return removeSpecialProperty((SpecialPropertyI)object);
  }
 else   if (object instanceof TokenI) {
    return removeToken((TokenI)object);
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
/** 
 * Remove an object. Low-level method, only to be called by Move objects.
 * @param object The object to remove.
 * @return True if successful.
 */
public boolean removeObject(Moveable object){
  if (object instanceof PublicCertificateI) {
    removeCertificate((PublicCertificateI)object);
    return true;
  }
 else   if (object instanceof PrivateCompanyI) {
    removePrivate((PrivateCompanyI)object);
    return true;
  }
 else   if (object instanceof TrainI) {
    removeTrain((TrainI)object);
    return true;
  }
 else   if (object instanceof SpecialPropertyI) {
    return removeSpecialProperty((SpecialPropertyI)object);
  }
 else   if (object instanceof TokenI) {
    return removeToken((TokenI)object);
  }
 else {
    return false;
  }
}
Program: 173603
Project: 173603
Buggy source:
public boolean removeToken(TokenI token){
  return tokens.remove(token);
}

Fixed version (ground truth):
/** 
 * Low-level method, only to be called by the local addObject() method. 
 */
public boolean removeToken(TokenI token){
  return tokens.remove(token);
}
Program: 173604
Project: 173604
Buggy source:
public void addCertificate(PublicCertificateI certificate,int[] position){
  if (certificate.isPresidentShare())   position=new int[]{0,0,0};
  Util.addToList(certificates,certificate,position[0]);
  String companyName=certificate.getCompany().getName();
  if (!certPerCompany.containsKey(companyName)) {
    certPerCompany.put(companyName,new ArrayList<PublicCertificateI>());
  }
  Util.addToList(certPerCompany.get(companyName),certificate,position[1]);
  String certTypeId=certificate.getTypeId();
  if (!certsPerType.containsKey(certTypeId)) {
    certsPerType.put(certTypeId,new ArrayList<PublicCertificateI>());
  }
  Util.addToList(certsPerType.get(certTypeId),certificate,position[2]);
  certificate.setPortfolio(this);
  getShareModel(certificate.getCompany()).addShare(certificate.getShare());
  if (owner instanceof Player) {
    ((Player)owner).updateWorth();
  }
}

Fixed version (ground truth):
/** 
 * Low-level method, only to be called by the local addObject() method. 
 */
private void addCertificate(PublicCertificateI certificate,int[] position){
  if (certificate.isPresidentShare())   position=new int[]{0,0,0};
  Util.addToList(certificates,certificate,position[0]);
  String companyName=certificate.getCompany().getName();
  if (!certPerCompany.containsKey(companyName)) {
    certPerCompany.put(companyName,new ArrayList<PublicCertificateI>());
  }
  Util.addToList(certPerCompany.get(companyName),certificate,position[1]);
  String certTypeId=certificate.getTypeId();
  if (!certsPerType.containsKey(certTypeId)) {
    certsPerType.put(certTypeId,new ArrayList<PublicCertificateI>());
  }
  Util.addToList(certsPerType.get(certTypeId),certificate,position[2]);
  certificate.setPortfolio(this);
  getShareModel(certificate.getCompany()).addShare(certificate.getShare());
  updatePlayerWorth();
}
Program: 173605
Project: 173605
Buggy source:
public void addPrivate(PrivateCompanyI privateCompany,int position){
  if (!Util.addToList(privateCompanies,privateCompany,position))   return;
  privateCompany.setHolder(this);
  log.debug("String_Node_Str" + privateCompany.getName() + "String_Node_Str"+ name);
  if (privateCompany.getSpecialProperties() != null) {
    log.debug(privateCompany.getName() + "String_Node_Str");
  }
 else {
    log.debug(privateCompany.getName() + "String_Node_Str");
  }
  privatesOwnedModel.update();
}

Fixed version (ground truth):
/** 
 * Low-level method, only to be called by the local addObject() method and by initialisation code. 
 */
public void addPrivate(PrivateCompanyI privateCompany,int position){
  if (!Util.addToList(privateCompanies,privateCompany,position))   return;
  privateCompany.setHolder(this);
  log.debug("String_Node_Str" + privateCompany.getName() + "String_Node_Str"+ name);
  if (privateCompany.getSpecialProperties() != null) {
    log.debug(privateCompany.getName() + "String_Node_Str");
  }
 else {
    log.debug(privateCompany.getName() + "String_Node_Str");
  }
  privatesOwnedModel.update();
  updatePlayerWorth();
}
Program: 173606
Project: 173606
Buggy source:
public boolean removePrivate(PrivateCompanyI privateCompany){
  boolean removed=privateCompanies.remove(privateCompany);
  if (removed) {
    privatesOwnedModel.update();
  }
  return removed;
}

Fixed version (ground truth):
/** 
 * Low-level method, only to be called by the local addObject() method. 
 */
private boolean removePrivate(PrivateCompanyI privateCompany){
  boolean removed=privateCompanies.remove(privateCompany);
  if (removed) {
    privatesOwnedModel.update();
    updatePlayerWorth();
  }
  return removed;
}
Program: 173607
Project: 173607
Buggy source:
public void addTrain(TrainI train,int[] position){
  Util.addToList(trains,train,position[0]);
  TrainType type=train.getType();
  if (!trainsPerType.containsKey(type)) {
    trainsPerType.put(type,new ArrayList<TrainI>());
  }
  Util.addToList(trainsPerType.get(type),train,position[1]);
  TrainCertificateType certType=train.getCertType();
  if (!trainsPerCertType.containsKey(certType)) {
    trainsPerCertType.put(certType,new ArrayList<TrainI>());
  }
  Util.addToList(trainsPerCertType.get(certType),train,position[2]);
  train.setHolder(this);
  trainsModel.update();
}

Fixed version (ground truth):
/** 
 * Low-level method, only to be called by the local addObject() method. 
 */
private void addTrain(TrainI train,int[] position){
  Util.addToList(trains,train,position[0]);
  TrainType type=train.getType();
  if (!trainsPerType.containsKey(type)) {
    trainsPerType.put(type,new ArrayList<TrainI>());
  }
  Util.addToList(trainsPerType.get(type),train,position[1]);
  TrainCertificateType certType=train.getCertType();
  if (!trainsPerCertType.containsKey(certType)) {
    trainsPerCertType.put(certType,new ArrayList<TrainI>());
  }
  Util.addToList(trainsPerCertType.get(certType),train,position[2]);
  train.setHolder(this);
  trainsModel.update();
}
Program: 173608
Project: 173608
Buggy source:
/** 
 * Remove a special property.
 * @param property The special property object to remove.
 * @return True if successful.
 */
public boolean removeSpecialProperty(SpecialPropertyI property){
  boolean result=false;
  if (specialProperties != null) {
    result=specialProperties.remove(property);
    if (owner instanceof PublicCompanyI && property instanceof LocatedBonus) {
      PublicCompanyI company=(PublicCompanyI)owner;
      LocatedBonus locBonus=(LocatedBonus)property;
      company.removeBonus(locBonus.getName());
    }
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Remove a special property. Low-level method, only to be called by Move objects.
 * @param property The special property object to remove.
 * @return True if successful.
 */
private boolean removeSpecialProperty(SpecialPropertyI property){
  boolean result=false;
  if (specialProperties != null) {
    result=specialProperties.remove(property);
    if (owner instanceof PublicCompanyI && property instanceof LocatedBonus) {
      PublicCompanyI company=(PublicCompanyI)owner;
      LocatedBonus locBonus=(LocatedBonus)property;
      company.removeBonus(locBonus.getName());
    }
  }
  return result;
}
Program: 173609
Project: 173609
Buggy source:
public boolean addToken(TokenI token,int position){
  return Util.addToList(tokens,token,position);
}

Fixed version (ground truth):
/** 
 * Low-level method, only to be called by the local addObject() method. 
 */
public boolean addToken(TokenI token,int position){
  return Util.addToList(tokens,token,position);
}
Program: 173610
Project: 173610
Buggy source:
/** 
 * Add an object.
 * @param object The object to add.
 * @return True if successful.
 */
public boolean addObject(Moveable object,int[] position){
  if (object instanceof PublicCertificateI) {
    if (position == null)     position=new int[]{-1,-1,-1};
    addCertificate((PublicCertificateI)object,position);
    return true;
  }
 else   if (object instanceof PrivateCompanyI) {
    addPrivate((PrivateCompanyI)object,position == null ? -1 : position[0]);
    return true;
  }
 else   if (object instanceof TrainI) {
    if (position == null)     position=new int[]{-1,-1,-1};
    addTrain((TrainI)object,position);
    return true;
  }
 else   if (object instanceof SpecialPropertyI) {
    return addSpecialProperty((SpecialPropertyI)object,position == null ? -1 : position[0]);
  }
 else   if (object instanceof TokenI) {
    return addToken((TokenI)object,position == null ? -1 : position[0]);
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
/** 
 * Add an object. Low-level method, only to be called by Move objects.
 * @param object The object to add.
 * @return True if successful.
 */
public boolean addObject(Moveable object,int[] position){
  if (object instanceof PublicCertificateI) {
    if (position == null)     position=new int[]{-1,-1,-1};
    addCertificate((PublicCertificateI)object,position);
    return true;
  }
 else   if (object instanceof PrivateCompanyI) {
    addPrivate((PrivateCompanyI)object,position == null ? -1 : position[0]);
    return true;
  }
 else   if (object instanceof TrainI) {
    if (position == null)     position=new int[]{-1,-1,-1};
    addTrain((TrainI)object,position);
    return true;
  }
 else   if (object instanceof SpecialPropertyI) {
    return addSpecialProperty((SpecialPropertyI)object,position == null ? -1 : position[0]);
  }
 else   if (object instanceof TokenI) {
    return addToken((TokenI)object,position == null ? -1 : position[0]);
  }
 else {
    return false;
  }
}
Program: 173611
Project: 173611
Buggy source:
public void removeCertificate(PublicCertificateI certificate){
  certificates.remove(certificate);
  String companyName=certificate.getCompany().getName();
  List<PublicCertificateI> certs=getCertificatesPerCompany(companyName);
  certs.remove(certificate);
  String certTypeId=certificate.getTypeId();
  if (certsPerType.containsKey(certTypeId)) {
    certsPerType.get(certTypeId).remove(0);
    if (certsPerType.get(certTypeId).isEmpty()) {
      certsPerType.remove(certTypeId);
    }
  }
  getShareModel(certificate.getCompany()).addShare(-certificate.getShare());
  if (owner instanceof Player) {
    ((Player)owner).updateWorth();
  }
}

Fixed version (ground truth):
/** 
 * Low-level method, only to be called by the local addObject() method. 
 */
private void removeCertificate(PublicCertificateI certificate){
  certificates.remove(certificate);
  String companyName=certificate.getCompany().getName();
  List<PublicCertificateI> certs=getCertificatesPerCompany(companyName);
  certs.remove(certificate);
  String certTypeId=certificate.getTypeId();
  if (certsPerType.containsKey(certTypeId)) {
    certsPerType.get(certTypeId).remove(0);
    if (certsPerType.get(certTypeId).isEmpty()) {
      certsPerType.remove(certTypeId);
    }
  }
  getShareModel(certificate.getCompany()).addShare(-certificate.getShare());
  updatePlayerWorth();
}
Program: 173612
Project: 173612
Buggy source:
public boolean addToken(TokenI token,int position);

Fixed version (ground truth):
/** 
 * Add a token. Subclasses may override this method to implement side effects.
 * @param token The token object to add.
 * @return True if successful.
 */
public boolean addToken(TokenI token,int position);
Program: 173614
Project: 173614
Buggy source:
/** 
 * Create a List of allowed normal tile lays (see LayTile class). This method should be called only once per company turn in an OR: at the start of the tile laying step.
 */
protected void getNormalTileLays(){
  Map<String,Integer> newTileColours=new HashMap<String,Integer>(getCurrentPhase().getTileColours());
  for (  String colour : newTileColours.keySet()) {
    int allowedNumber=operatingCompany.get().getNumberOfTileLays(colour);
    newTileColours.put(colour,new Integer(allowedNumber));
  }
  tileLaysPerColour.initFromMap(newTileColours);
}

Fixed version (ground truth):
protected List<LayTile> getNormalTileLays(boolean display){
  List<LayTile> currentNormalTileLays=new ArrayList<LayTile>();
  Map<String,Integer> remainingTileLaysPerColour=new HashMap<String,Integer>();
  int lays=0;
  for (  String colourName : tileLaysPerColour.viewKeySet()) {
    lays=tileLaysPerColour.get(colourName);
    if (lays != 0) {
      remainingTileLaysPerColour.put(colourName,lays);
    }
  }
  if (!remainingTileLaysPerColour.isEmpty()) {
    currentNormalTileLays.add(new LayTile(remainingTileLaysPerColour));
  }
  if (display) {
    int size=currentNormalTileLays.size();
    if (size == 0) {
      log.debug("String_Node_Str");
    }
 else {
      for (      LayTile tileLay : currentNormalTileLays) {
        log.debug("String_Node_Str" + tileLay.toString());
      }
    }
  }
  return currentNormalTileLays;
}