nus-yam/ex-repair huggingface dataset:
Program: 85437
Project: 85437
Buggy source:
@Override public void mouseReleased(MouseEvent event){
  if (dragRectangle != null) {
    if (!isSorted(sourceComponents,new YComparator())) {
      Collections.sort(sourceComponents,new YComparator());
      mapping.setSourceItems(getItemsList(sourceComponents));
    }
    if (!isSorted(targetComponents,new YComparator())) {
      Collections.sort(targetComponents,new YComparator());
      mapping.setTargetItems(getItemsList(targetComponents));
    }
    dragRectangle=null;
    layoutItems();
  }
 else   if (dragArrow != null) {
    if (event.getX() > targetX - ARROW_START_WIDTH && event.getX() < targetX + ITEM_WIDTH)     for (    LabeledRectangle component : getVisibleRectangles(targetComponents)) {
      if (component.contains(event.getPoint(),ARROW_START_WIDTH,0)) {
        dragArrow.setTarget(component);
        if (dragArrow.getTarget() == dragArrowPreviousTarget) {
          arrows.add(dragArrow);
          break;
        }
        makeMapSourceToTarget(dragArrow.getSource(),dragArrow.getTarget());
        break;
      }
    }
    if (dragArrowPreviousTarget != null && dragArrow.getTarget() != dragArrowPreviousTarget) {
      mapping.removeSourceToTargetMap(dragArrow.getSource().getItem(),dragArrowPreviousTarget.getItem());
    }
    dragArrowPreviousTarget=null;
    dragArrow=null;
  }
  repaint();
}

Fixed version (ground truth):
@Override public void mouseReleased(MouseEvent event){
  if (dragRectangle != null) {
    if (!isSorted(sourceComponents,new YComparator())) {
      Collections.sort(sourceComponents,new YComparator());
      mapping.setSourceItems(getItemsList(sourceComponents));
    }
    if (!isSorted(cdmComponents,new YComparator())) {
      Collections.sort(cdmComponents,new YComparator());
      mapping.setTargetItems(getItemsList(cdmComponents));
    }
    dragRectangle=null;
    layoutItems();
  }
 else   if (dragArrow != null) {
    if (event.getX() > cdmX - ARROW_START_WIDTH && event.getX() < cdmX + ITEM_WIDTH)     for (    LabeledRectangle component : getVisibleRectangles(cdmComponents)) {
      if (component.contains(event.getPoint(),ARROW_START_WIDTH,0)) {
        dragArrow.setTarget(component);
        if (dragArrow.getTarget() == dragArrowPreviousTarget) {
          arrows.add(dragArrow);
          break;
        }
        makeMapSourceToTarget(dragArrow.getSource(),dragArrow.getTarget());
        break;
      }
    }
    if (dragArrowPreviousTarget != null && dragArrow.getTarget() != dragArrowPreviousTarget) {
      mapping.removeSourceToTargetMap(dragArrow.getSource().getItem(),dragArrowPreviousTarget.getItem());
    }
    dragArrowPreviousTarget=null;
    dragArrow=null;
  }
  repaint();
}
Program: 85438
Project: 85438
Buggy source:
public void setSize(int width,int height){
  sourceX=MARGIN;
  targetX=width - MARGIN - ITEM_WIDTH;
  layoutItems();
  super.setSize(width,height);
}

Fixed version (ground truth):
public void setSize(int width,int height){
  sourceX=MARGIN;
  cdmX=width - MARGIN - ITEM_WIDTH;
  layoutItems();
  super.setSize(width,height);
}
Program: 85439
Project: 85439
Buggy source:
public void removeMapSelectedSourceAndTarget(){
  for (  LabeledRectangle source : getSelectedRectangles(sourceComponents)) {
    for (    LabeledRectangle target : getSelectedRectangles(targetComponents)) {
      removeMapSourceToTarget(source,target);
    }
  }
}

Fixed version (ground truth):
public void removeMapSelectedSourceAndTarget(){
  for (  LabeledRectangle source : getSelectedRectangles(sourceComponents)) {
    for (    LabeledRectangle target : getSelectedRectangles(cdmComponents)) {
      removeMapSourceToTarget(source,target);
    }
  }
}
Program: 85440
Project: 85440
Buggy source:
public Mapping<Table> getTableToTableMapping(){
  return new Mapping<Table>(sourceDb.getTables(),targetDb.getTables(),tableToTableMaps);
}

Fixed version (ground truth):
public Mapping<Table> getTableToTableMapping(){
  return new Mapping<Table>(sourceDb.getTables(),cdmDb.getTables(),tableToTableMaps);
}
Program: 85441
Project: 85441
Buggy source:
public Database getTargetDatabase(){
  return targetDb;
}

Fixed version (ground truth):
public Database getTargetDatabase(){
  return cdmDb;
}
Program: 85442
Project: 85442
Buggy source:
public void setTargetDatabase(Database targetDb){
  this.targetDb=targetDb;
}

Fixed version (ground truth):
public void setTargetDatabase(Database targetDb){
  this.cdmDb=targetDb;
}
Program: 85443
Project: 85443
Buggy source:
public ItemToItemMap(MappableItem sourceItem,MappableItem targetItem){
  this.sourceItem=sourceItem;
  this.targetItem=targetItem;
}

Fixed version (ground truth):
public ItemToItemMap(MappableItem sourceItem,MappableItem cdmItem){
  this.sourceItem=sourceItem;
  this.cdmItem=cdmItem;
}
Program: 85444
Project: 85444
Buggy source:
public MappableItem getTargetItem(){
  return targetItem;
}

Fixed version (ground truth):
public MappableItem getTargetItem(){
  return cdmItem;
}
Program: 85445
Project: 85445
Buggy source:
public int hashCode(){
  return (sourceItem.toString() + "String_Node_Str" + targetItem.toString()).hashCode();
}

Fixed version (ground truth):
public int hashCode(){
  return (sourceItem.toString() + "String_Node_Str" + cdmItem.toString()).hashCode();
}
Program: 85446
Project: 85446
Buggy source:
public void setTargetItem(MappableItem targetItem){
  this.targetItem=targetItem;
}

Fixed version (ground truth):
public void setTargetItem(MappableItem cdmItem){
  this.cdmItem=cdmItem;
}
Program: 85447
Project: 85447
Buggy source:
public boolean equals(Object other){
  if (other instanceof ItemToItemMap) {
    return (((ItemToItemMap)other).sourceItem.equals(sourceItem) && ((ItemToItemMap)other).targetItem.equals(targetItem));
  }
 else   return false;
}

Fixed version (ground truth):
public boolean equals(Object other){
  if (other instanceof ItemToItemMap) {
    return (((ItemToItemMap)other).sourceItem.equals(sourceItem) && ((ItemToItemMap)other).cdmItem.equals(cdmItem));
  }
 else   return false;
}
Program: 85448
Project: 85448
Buggy source:
public List<ItemToItemMap> getSourceToTargetMaps(){
  return sourceToTargetMaps;
}

Fixed version (ground truth):
public List<ItemToItemMap> getSourceToTargetMaps(){
  return sourceToCdmMaps;
}
Program: 85449
Project: 85449
Buggy source:
public void removeSourceToTargetMap(MappableItem sourceItem,MappableItem targetItem){
  Iterator<ItemToItemMap> iterator=sourceToTargetMaps.iterator();
  while (iterator.hasNext()) {
    ItemToItemMap sourceToTargetMap=iterator.next();
    if (sourceToTargetMap.getSourceItem().equals(sourceItem) && sourceToTargetMap.getTargetItem().equals(targetItem))     iterator.remove();
  }
}

Fixed version (ground truth):
public void removeSourceToTargetMap(MappableItem sourceItem,MappableItem targetItem){
  Iterator<ItemToItemMap> iterator=sourceToCdmMaps.iterator();
  while (iterator.hasNext()) {
    ItemToItemMap sourceToTargetMap=iterator.next();
    if (sourceToTargetMap.getSourceItem().equals(sourceItem) && sourceToTargetMap.getTargetItem().equals(targetItem))     iterator.remove();
  }
}
Program: 85450
Project: 85450
Buggy source:
public void addSourceToTargetMap(MappableItem sourceItem,MappableItem targetItem){
  sourceToTargetMaps.add(new ItemToItemMap(sourceItem,targetItem));
}

Fixed version (ground truth):
public void addSourceToTargetMap(MappableItem sourceItem,MappableItem targetItem){
  sourceToCdmMaps.add(new ItemToItemMap(sourceItem,targetItem));
}
Program: 85451
Project: 85451
Buggy source:
@SuppressWarnings("String_Node_Str") public void setTargetItems(List<? extends MappableItem> targetItems){
  this.targetItems.clear();
  for (  MappableItem item : targetItems)   this.targetItems.add((T)item);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void setTargetItems(List<? extends MappableItem> targetItems){
  this.cdmItems.clear();
  for (  MappableItem item : targetItems)   this.cdmItems.add((T)item);
}
Program: 85452
Project: 85452
Buggy source:
public ItemToItemMap getSourceToTargetMap(MappableItem sourceItem,MappableItem targetItem){
  Iterator<ItemToItemMap> iterator=sourceToTargetMaps.iterator();
  while (iterator.hasNext()) {
    ItemToItemMap sourceToTargetMap=iterator.next();
    if (sourceToTargetMap.getSourceItem().equals(sourceItem) && sourceToTargetMap.getTargetItem().equals(targetItem))     return sourceToTargetMap;
  }
  return null;
}

Fixed version (ground truth):
public ItemToItemMap getSourceToTargetMap(MappableItem sourceItem,MappableItem targetItem){
  Iterator<ItemToItemMap> iterator=sourceToCdmMaps.iterator();
  while (iterator.hasNext()) {
    ItemToItemMap sourceToTargetMap=iterator.next();
    if (sourceToTargetMap.getSourceItem().equals(sourceItem) && sourceToTargetMap.getTargetItem().equals(targetItem))     return sourceToTargetMap;
  }
  return null;
}
Program: 85453
Project: 85453
Buggy source:
public List<MappableItem> getTargetItems(){
  List<MappableItem> list=new ArrayList<MappableItem>();
  for (  MappableItem item : targetItems)   list.add(item);
  return list;
}

Fixed version (ground truth):
public List<MappableItem> getTargetItems(){
  List<MappableItem> list=new ArrayList<MappableItem>();
  for (  MappableItem item : cdmItems)   list.add(item);
  return list;
}
Program: 85454
Project: 85454
Buggy source:
public Mapping(List<T> sourceItems,List<T> targetItems,List<ItemToItemMap> sourceToTargetMaps){
  this.sourceItems=sourceItems;
  this.targetItems=targetItems;
  this.sourceToTargetMaps=sourceToTargetMaps;
}

Fixed version (ground truth):
public Mapping(List<T> sourceItems,List<T> targetItems,List<ItemToItemMap> sourceToTargetMaps){
  this.sourceItems=sourceItems;
  this.cdmItems=targetItems;
  this.sourceToCdmMaps=sourceToTargetMaps;
}
Program: 85455
Project: 85455
Buggy source:
private void layoutItems(){
  if (minimized) {
    for (    LabeledRectangle targetComponent : getVisibleTargetComponents()) {
      targetComponent.setLocation(targetX,targetComponent.getY());
    }
  }
 else {
    setLabeledRectanglesLocation(getVisibleSourceComponents(),sourceX);
    setLabeledRectanglesLocation(getVisibleTargetComponents(),targetX);
  }
}

Fixed version (ground truth):
private void layoutItems(){
  if (minimized) {
    for (    LabeledRectangle targetComponent : getVisibleTargetComponents()) {
      targetComponent.setLocation(cdmX,targetComponent.getY());
    }
  }
 else {
    setLabeledRectanglesLocation(getVisibleSourceComponents(),sourceX);
    setLabeledRectanglesLocation(getVisibleTargetComponents(),cdmX);
  }
}
Program: 85458
Project: 85458
Buggy source:
public void filterComponents(String searchTerm,boolean filterTarget){
  List<LabeledRectangle> components;
  if (filterTarget == true) {
    components=targetComponents;
    lastTargetFilter=searchTerm;
  }
 else {
    components=sourceComponents;
    lastSourceFilter=searchTerm;
  }
  for (  LabeledRectangle c : components) {
    c.filter(searchTerm);
  }
  layoutItems();
  repaint();
}

Fixed version (ground truth):
public void filterComponents(String searchTerm,boolean filterTarget){
  List<LabeledRectangle> components;
  if (filterTarget == true) {
    components=cdmComponents;
    lastTargetFilter=searchTerm;
  }
 else {
    components=sourceComponents;
    lastSourceFilter=searchTerm;
  }
  for (  LabeledRectangle c : components) {
    c.filter(searchTerm);
  }
  layoutItems();
  repaint();
}
Program: 85460
Project: 85460
Buggy source:
public List<LabeledRectangle> getVisibleTargetComponents(){
  return getVisibleRectangles(targetComponents);
}

Fixed version (ground truth):
public List<LabeledRectangle> getVisibleTargetComponents(){
  return getVisibleRectangles(cdmComponents);
}
Program: 85461
Project: 85461
Buggy source:
public Dimension getMinimumSize(){
  Dimension dimension=new Dimension();
  dimension.width=2 * (ITEM_WIDTH + MARGIN) + MIN_SPACE_BETWEEN_COLUMNS;
  dimension.height=Math.min(HEADER_HEIGHT + HEADER_TOP_MARGIN + Math.max(sourceComponents.size(),targetComponents.size()) * (ITEM_HEIGHT + MARGIN),maxHeight);
  return dimension;
}

Fixed version (ground truth):
public Dimension getMinimumSize(){
  Dimension dimension=new Dimension();
  dimension.width=2 * (ITEM_WIDTH + MARGIN) + MIN_SPACE_BETWEEN_COLUMNS;
  dimension.height=Math.min(HEADER_HEIGHT + HEADER_TOP_MARGIN + Math.max(sourceComponents.size(),cdmComponents.size()) * (ITEM_HEIGHT + MARGIN),maxHeight);
  return dimension;
}
Program: 85463
Project: 85463
Buggy source:
public void makeMapSelectedSourceAndTarget(){
  for (  LabeledRectangle source : getSelectedRectangles(sourceComponents)) {
    for (    LabeledRectangle target : getSelectedRectangles(targetComponents)) {
      makeMapSourceToTarget(source,target);
    }
  }
}

Fixed version (ground truth):
public void makeMapSelectedSourceAndTarget(){
  for (  LabeledRectangle source : getSelectedRectangles(sourceComponents)) {
    for (    LabeledRectangle target : getSelectedRectangles(cdmComponents)) {
      makeMapSourceToTarget(source,target);
    }
  }
}
Program: 85464
Project: 85464
Buggy source:
private void renderModel(){
  sourceComponents.clear();
  targetComponents.clear();
  arrows.clear();
  for (  MappableItem item : mapping.getSourceItems())   if (!showOnlyConnectedItems || isConnected(item)) {
    LabeledRectangle component=new LabeledRectangle(0,400,ITEM_WIDTH,ITEM_HEIGHT,item,new Color(255,128,0));
    sourceComponents.add(component);
  }
  for (  MappableItem item : mapping.getTargetItems())   if (!showOnlyConnectedItems || isConnected(item)) {
    LabeledRectangle component=new LabeledRectangle(0,400,ITEM_WIDTH,ITEM_HEIGHT,item,new Color(128,128,255));
    targetComponents.add(component);
  }
  for (  ItemToItemMap map : mapping.getSourceToTargetMaps()) {
    Arrow component=new Arrow(getComponentWithItem(map.getSourceItem(),sourceComponents),getComponentWithItem(map.getTargetItem(),targetComponents));
    arrows.add(component);
  }
  layoutItems();
  repaint();
}

Fixed version (ground truth):
private void renderModel(){
  sourceComponents.clear();
  cdmComponents.clear();
  arrows.clear();
  for (  MappableItem item : mapping.getSourceItems())   if (!showOnlyConnectedItems || isConnected(item)) {
    LabeledRectangle component=new LabeledRectangle(0,400,ITEM_WIDTH,ITEM_HEIGHT,item,new Color(255,128,0));
    sourceComponents.add(component);
  }
  for (  MappableItem item : mapping.getTargetItems())   if (!showOnlyConnectedItems || isConnected(item)) {
    LabeledRectangle component=new LabeledRectangle(0,400,ITEM_WIDTH,ITEM_HEIGHT,item,new Color(128,128,255));
    cdmComponents.add(component);
  }
  for (  ItemToItemMap map : mapping.getSourceToTargetMaps()) {
    Arrow component=new Arrow(getComponentWithItem(map.getSourceItem(),sourceComponents),getComponentWithItem(map.getTargetItem(),cdmComponents));
    arrows.add(component);
  }
  layoutItems();
  repaint();
}
Program: 85465
Project: 85465
Buggy source:
@Override public void mouseReleased(MouseEvent event){
  if (dragRectangle != null) {
    if (!isSorted(sourceComponents,new YComparator())) {
      Collections.sort(sourceComponents,new YComparator());
      mapping.setSourceItems(getItemsList(sourceComponents));
    }
    if (!isSorted(targetComponents,new YComparator())) {
      Collections.sort(targetComponents,new YComparator());
      mapping.setTargetItems(getItemsList(targetComponents));
    }
    dragRectangle=null;
    layoutItems();
  }
 else   if (dragArrow != null) {
    if (event.getX() > targetX - ARROW_START_WIDTH && event.getX() < targetX + ITEM_WIDTH)     for (    LabeledRectangle component : getVisibleRectangles(targetComponents)) {
      if (component.contains(event.getPoint(),ARROW_START_WIDTH,0)) {
        dragArrow.setTarget(component);
        if (dragArrow.getTarget() == dragArrowPreviousTarget) {
          arrows.add(dragArrow);
          break;
        }
        makeMapSourceToTarget(dragArrow.getSource(),dragArrow.getTarget());
        break;
      }
    }
    if (dragArrowPreviousTarget != null && dragArrow.getTarget() != dragArrowPreviousTarget) {
      mapping.removeSourceToTargetMap(dragArrow.getSource().getItem(),dragArrowPreviousTarget.getItem());
    }
    dragArrowPreviousTarget=null;
    dragArrow=null;
  }
  repaint();
}

Fixed version (ground truth):
@Override public void mouseReleased(MouseEvent event){
  if (dragRectangle != null) {
    if (!isSorted(sourceComponents,new YComparator())) {
      Collections.sort(sourceComponents,new YComparator());
      mapping.setSourceItems(getItemsList(sourceComponents));
    }
    if (!isSorted(cdmComponents,new YComparator())) {
      Collections.sort(cdmComponents,new YComparator());
      mapping.setTargetItems(getItemsList(cdmComponents));
    }
    dragRectangle=null;
    layoutItems();
  }
 else   if (dragArrow != null) {
    if (event.getX() > cdmX - ARROW_START_WIDTH && event.getX() < cdmX + ITEM_WIDTH)     for (    LabeledRectangle component : getVisibleRectangles(cdmComponents)) {
      if (component.contains(event.getPoint(),ARROW_START_WIDTH,0)) {
        dragArrow.setTarget(component);
        if (dragArrow.getTarget() == dragArrowPreviousTarget) {
          arrows.add(dragArrow);
          break;
        }
        makeMapSourceToTarget(dragArrow.getSource(),dragArrow.getTarget());
        break;
      }
    }
    if (dragArrowPreviousTarget != null && dragArrow.getTarget() != dragArrowPreviousTarget) {
      mapping.removeSourceToTargetMap(dragArrow.getSource().getItem(),dragArrowPreviousTarget.getItem());
    }
    dragArrowPreviousTarget=null;
    dragArrow=null;
  }
  repaint();
}
Program: 85466
Project: 85466
Buggy source:
public void setSize(int width,int height){
  sourceX=MARGIN;
  targetX=width - MARGIN - ITEM_WIDTH;
  layoutItems();
  super.setSize(width,height);
}

Fixed version (ground truth):
public void setSize(int width,int height){
  sourceX=MARGIN;
  cdmX=width - MARGIN - ITEM_WIDTH;
  layoutItems();
  super.setSize(width,height);
}
Program: 85467
Project: 85467
Buggy source:
public void removeMapSelectedSourceAndTarget(){
  for (  LabeledRectangle source : getSelectedRectangles(sourceComponents)) {
    for (    LabeledRectangle target : getSelectedRectangles(targetComponents)) {
      removeMapSourceToTarget(source,target);
    }
  }
}

Fixed version (ground truth):
public void removeMapSelectedSourceAndTarget(){
  for (  LabeledRectangle source : getSelectedRectangles(sourceComponents)) {
    for (    LabeledRectangle target : getSelectedRectangles(cdmComponents)) {
      removeMapSourceToTarget(source,target);
    }
  }
}
Program: 85468
Project: 85468
Buggy source:
public Mapping<Table> getTableToTableMapping(){
  return new Mapping<Table>(sourceDb.getTables(),targetDb.getTables(),tableToTableMaps);
}

Fixed version (ground truth):
public Mapping<Table> getTableToTableMapping(){
  return new Mapping<Table>(sourceDb.getTables(),cdmDb.getTables(),tableToTableMaps);
}
Program: 85469
Project: 85469
Buggy source:
public Database getTargetDatabase(){
  return targetDb;
}

Fixed version (ground truth):
public Database getTargetDatabase(){
  return cdmDb;
}
Program: 85470
Project: 85470
Buggy source:
public void setTargetDatabase(Database targetDb){
  this.targetDb=targetDb;
}

Fixed version (ground truth):
public void setTargetDatabase(Database targetDb){
  this.cdmDb=targetDb;
}
Program: 85471
Project: 85471
Buggy source:
public ItemToItemMap(MappableItem sourceItem,MappableItem targetItem){
  this.sourceItem=sourceItem;
  this.targetItem=targetItem;
}

Fixed version (ground truth):
public ItemToItemMap(MappableItem sourceItem,MappableItem cdmItem){
  this.sourceItem=sourceItem;
  this.cdmItem=cdmItem;
}
Program: 85472
Project: 85472
Buggy source:
public MappableItem getTargetItem(){
  return targetItem;
}

Fixed version (ground truth):
public MappableItem getTargetItem(){
  return cdmItem;
}
Program: 85473
Project: 85473
Buggy source:
public int hashCode(){
  return (sourceItem.toString() + "String_Node_Str" + targetItem.toString()).hashCode();
}

Fixed version (ground truth):
public int hashCode(){
  return (sourceItem.toString() + "String_Node_Str" + cdmItem.toString()).hashCode();
}
Program: 85474
Project: 85474
Buggy source:
public void setTargetItem(MappableItem targetItem){
  this.targetItem=targetItem;
}

Fixed version (ground truth):
public void setTargetItem(MappableItem cdmItem){
  this.cdmItem=cdmItem;
}
Program: 85475
Project: 85475
Buggy source:
public boolean equals(Object other){
  if (other instanceof ItemToItemMap) {
    return (((ItemToItemMap)other).sourceItem.equals(sourceItem) && ((ItemToItemMap)other).targetItem.equals(targetItem));
  }
 else   return false;
}

Fixed version (ground truth):
public boolean equals(Object other){
  if (other instanceof ItemToItemMap) {
    return (((ItemToItemMap)other).sourceItem.equals(sourceItem) && ((ItemToItemMap)other).cdmItem.equals(cdmItem));
  }
 else   return false;
}
Program: 85476
Project: 85476
Buggy source:
public List<ItemToItemMap> getSourceToTargetMaps(){
  return sourceToTargetMaps;
}

Fixed version (ground truth):
public List<ItemToItemMap> getSourceToTargetMaps(){
  return sourceToCdmMaps;
}
Program: 85477
Project: 85477
Buggy source:
public void removeSourceToTargetMap(MappableItem sourceItem,MappableItem targetItem){
  Iterator<ItemToItemMap> iterator=sourceToTargetMaps.iterator();
  while (iterator.hasNext()) {
    ItemToItemMap sourceToTargetMap=iterator.next();
    if (sourceToTargetMap.getSourceItem().equals(sourceItem) && sourceToTargetMap.getTargetItem().equals(targetItem))     iterator.remove();
  }
}

Fixed version (ground truth):
public void removeSourceToTargetMap(MappableItem sourceItem,MappableItem targetItem){
  Iterator<ItemToItemMap> iterator=sourceToCdmMaps.iterator();
  while (iterator.hasNext()) {
    ItemToItemMap sourceToTargetMap=iterator.next();
    if (sourceToTargetMap.getSourceItem().equals(sourceItem) && sourceToTargetMap.getTargetItem().equals(targetItem))     iterator.remove();
  }
}
Program: 85478
Project: 85478
Buggy source:
public void addSourceToTargetMap(MappableItem sourceItem,MappableItem targetItem){
  sourceToTargetMaps.add(new ItemToItemMap(sourceItem,targetItem));
}

Fixed version (ground truth):
public void addSourceToTargetMap(MappableItem sourceItem,MappableItem targetItem){
  sourceToCdmMaps.add(new ItemToItemMap(sourceItem,targetItem));
}
Program: 85479
Project: 85479
Buggy source:
@SuppressWarnings("String_Node_Str") public void setTargetItems(List<? extends MappableItem> targetItems){
  this.targetItems.clear();
  for (  MappableItem item : targetItems)   this.targetItems.add((T)item);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void setTargetItems(List<? extends MappableItem> targetItems){
  this.cdmItems.clear();
  for (  MappableItem item : targetItems)   this.cdmItems.add((T)item);
}
Program: 85480
Project: 85480
Buggy source:
public ItemToItemMap getSourceToTargetMap(MappableItem sourceItem,MappableItem targetItem){
  Iterator<ItemToItemMap> iterator=sourceToTargetMaps.iterator();
  while (iterator.hasNext()) {
    ItemToItemMap sourceToTargetMap=iterator.next();
    if (sourceToTargetMap.getSourceItem().equals(sourceItem) && sourceToTargetMap.getTargetItem().equals(targetItem))     return sourceToTargetMap;
  }
  return null;
}

Fixed version (ground truth):
public ItemToItemMap getSourceToTargetMap(MappableItem sourceItem,MappableItem targetItem){
  Iterator<ItemToItemMap> iterator=sourceToCdmMaps.iterator();
  while (iterator.hasNext()) {
    ItemToItemMap sourceToTargetMap=iterator.next();
    if (sourceToTargetMap.getSourceItem().equals(sourceItem) && sourceToTargetMap.getTargetItem().equals(targetItem))     return sourceToTargetMap;
  }
  return null;
}
Program: 85481
Project: 85481
Buggy source:
public List<MappableItem> getTargetItems(){
  List<MappableItem> list=new ArrayList<MappableItem>();
  for (  MappableItem item : targetItems)   list.add(item);
  return list;
}

Fixed version (ground truth):
public List<MappableItem> getTargetItems(){
  List<MappableItem> list=new ArrayList<MappableItem>();
  for (  MappableItem item : cdmItems)   list.add(item);
  return list;
}
Program: 85482
Project: 85482
Buggy source:
public Mapping(List<T> sourceItems,List<T> targetItems,List<ItemToItemMap> sourceToTargetMaps){
  this.sourceItems=sourceItems;
  this.targetItems=targetItems;
  this.sourceToTargetMaps=sourceToTargetMaps;
}

Fixed version (ground truth):
public Mapping(List<T> sourceItems,List<T> targetItems,List<ItemToItemMap> sourceToTargetMaps){
  this.sourceItems=sourceItems;
  this.cdmItems=targetItems;
  this.sourceToCdmMaps=sourceToTargetMaps;
}
Program: 85483
Project: 85483
Buggy source:
private static void addSourceTablesAppendix(CustomXWPFDocument document,ETL etl){
  XWPFParagraph paragraph=document.createParagraph();
  XWPFRun run=paragraph.createRun();
  run.addBreak(BreakType.PAGE);
  run.setText("String_Node_Str");
  run.setFontSize(18);
  for (  Table sourceTable : etl.getSourceDatabase().getTables()) {
    paragraph=document.createParagraph();
    run=paragraph.createRun();
    run.setText("String_Node_Str" + sourceTable.getName());
    run.setFontSize(14);
    if (!sourceTable.getComment().equals("String_Node_Str")) {
      paragraph=document.createParagraph();
      run=paragraph.createRun();
      run.setText(sourceTable.getComment());
    }
    XWPFTable table=document.createTable(sourceTable.getFields().size() + 1,4);
    XWPFTableRow header=table.getRow(0);
    setTextAndHeaderShading(header.getCell(0),"String_Node_Str");
    setTextAndHeaderShading(header.getCell(1),"String_Node_Str");
    setTextAndHeaderShading(header.getCell(2),"String_Node_Str");
    setTextAndHeaderShading(header.getCell(3),"String_Node_Str");
    int rowNr=1;
    for (    Field sourceField : sourceTable.getFields()) {
      XWPFTableRow row=table.getRow(rowNr++);
      row.getCell(0).setText(sourceField.getName());
      row.getCell(1).setText(sourceField.getType());
      if (sourceField.getValueCounts() != null)       row.getCell(2).setText(sourceField.getValueCounts()[0][0]);
      row.getCell(3).setText(sourceField.getComment());
    }
  }
  run.setFontSize(18);
}

Fixed version (ground truth):
private static void addSourceTablesAppendix(CustomXWPFDocument document,ETL etl){
  XWPFParagraph paragraph=document.createParagraph();
  XWPFRun run=paragraph.createRun();
  run.addBreak(BreakType.PAGE);
  run.setText("String_Node_Str");
  run.setFontSize(18);
  for (  Table sourceTable : etl.getSourceDatabase().getTables()) {
    paragraph=document.createParagraph();
    run=paragraph.createRun();
    run.setText("String_Node_Str" + sourceTable.getName());
    run.setFontSize(14);
    if (!sourceTable.getComment().equals("String_Node_Str")) {
      paragraph=document.createParagraph();
      run=paragraph.createRun();
      run.setText(sourceTable.getComment());
    }
    XWPFTable table=document.createTable(sourceTable.getFields().size() + 1,4);
    XWPFTableRow header=table.getRow(0);
    setTextAndHeaderShading(header.getCell(0),"String_Node_Str");
    setTextAndHeaderShading(header.getCell(1),"String_Node_Str");
    setTextAndHeaderShading(header.getCell(2),"String_Node_Str");
    setTextAndHeaderShading(header.getCell(3),"String_Node_Str");
    int rowNr=1;
    for (    Field sourceField : sourceTable.getFields()) {
      XWPFTableRow row=table.getRow(rowNr++);
      row.getCell(0).setText(sourceField.getName());
      row.getCell(1).setText(sourceField.getType());
      if (sourceField.getValueCounts() != null && sourceField.getValueCounts().length != 0)       row.getCell(2).setText(sourceField.getValueCounts()[0][0]);
      row.getCell(3).setText(sourceField.getComment());
    }
  }
  run.setFontSize(18);
}
Program: 85484
Project: 85484
Buggy source:
public void buildMap(){
  for (int i=1; i < raw.size(); i+=2) {
    byte[] k=raw.get(i);
    byte[] v=raw.get(i + 1);
    keys.add(k);
    items.put(k,v);
  }
}

Fixed version (ground truth):
public void buildMap(){
  for (int i=1; i < raw.size() + 1; i+=2) {
    byte[] k=raw.get(i);
    byte[] v=raw.get(i + 1);
    keys.add(k);
    items.put(k,v);
  }
}
Program: 85485
Project: 85485
Buggy source:
public void buildMap(){
  for (int i=1; i < raw.size() + 1; i+=2) {
    byte[] k=raw.get(i);
    byte[] v=raw.get(i + 1);
    keys.add(k);
    items.put(k,v);
  }
}

Fixed version (ground truth):
public void buildMap(){
  for (int i=1; i + 1 < raw.size(); i+=2) {
    byte[] k=raw.get(i);
    byte[] v=raw.get(i + 1);
    keys.add(k);
    items.put(k,v);
  }
}
Program: 85487
Project: 85487
Buggy source:
public static void main(String[] args) throws Exception {
  String k="String_Node_Str";
  String v="String_Node_Str";
  int i=0;
  while (true) {
    SSDB ssdb=null;
    try {
      ssdb=new SSDB("String_Node_Str",8888,5000);
      ssdb.set(k,v);
      ssdb.close();
    }
 catch (    Exception e) {
      if (ssdb != null) {
        ssdb.close();
      }
      continue;
    }
 finally {
      if (ssdb != null) {
        ssdb.close();
      }
    }
    if (ssdb != null) {
      ssdb.close();
    }
    if (++i % 1000 == 1) {
      System.out.println("String_Node_Str");
      System.in.read();
    }
  }
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  String s="String_Node_Str";
  s+=s;
  s+=s;
  byte[] bytes=s.getBytes();
  Link link=new Link();
  link.testRead(bytes);
  for (int i=0; i < bytes.length; i++) {
    byte[] bs={bytes[i]};
    link.testRead(bs);
  }
}
Program: 85488
Project: 85488
Buggy source:
private List<byte[]> parse(){
  ArrayList<byte[]> list=new ArrayList<byte[]>();
  byte[] buf=input.buf;
  int idx=0;
  while (true) {
    int pos=input.memchr('\n',idx);
    if (pos == -1) {
      break;
    }
    if (pos == idx || (pos == idx + 1 && buf[idx] == '\r')) {
      if (list.isEmpty()) {
        idx+=1;
        continue;
      }
 else {
        input.decr(idx + 1);
        return list;
      }
    }
    String str=new String(buf,input.data + idx,pos - idx);
    int len=Integer.parseInt(str);
    idx=pos + 1;
    if (idx + len >= input.size) {
      break;
    }
    byte[] data=Arrays.copyOfRange(buf,input.data + idx,input.data + idx + len);
    idx+=len + 1;
    list.add(data);
  }
  return null;
}

Fixed version (ground truth):
private List<byte[]> parse() throws Exception {
  ArrayList<byte[]> list=new ArrayList<byte[]>();
  int idx=0;
  while (idx < input.size && (input.chatAt(idx) == '\r' || input.chatAt(idx) == '\n')) {
    idx++;
  }
  while (idx < input.size) {
    int data_idx=input.memchr('\n',idx);
    if (data_idx == -1) {
      break;
    }
    data_idx+=1;
    int head_len=data_idx - idx;
    if (head_len == 1 || (head_len == 2 && input.chatAt(idx) == '\r')) {
      input.decr(data_idx);
      return list;
    }
    String str=new String(input.copyOfRange(idx,data_idx));
    str=str.trim();
    int size;
    try {
      size=Integer.parseInt(str,10);
    }
 catch (    Exception e) {
      throw new Exception("String_Node_Str");
    }
    idx=data_idx + size;
    int left=input.size - idx;
    if (left >= 1 && input.chatAt(idx) == '\n') {
      idx+=1;
    }
 else     if (left >= 2 && input.chatAt(idx) == '\r' && input.chatAt(idx + 1) == '\n') {
      idx+=2;
    }
 else     if (left >= 2) {
      throw new Exception("String_Node_Str");
    }
 else {
      break;
    }
    byte[] data=input.copyOfRange(data_idx,data_idx + size);
    list.add(data);
  }
  return null;
}
Program: 85489
Project: 85489
Buggy source:
private void send(MemoryStream buf) throws Exception {
  OutputStream os=sock.getOutputStream();
  os.write(buf.buf,buf.data,buf.size);
  os.flush();
}

Fixed version (ground truth):
private void send(MemoryStream buf) throws Exception {
  OutputStream os=sock.getOutputStream();
  os.write(buf.toArray());
  os.flush();
}
Program: 85490
Project: 85490
Buggy source:
@Override public void onPictureTaken(byte[] data,Camera camera){
  mTakenPhotoView.setImageBitmap(PhotoUtils.bitmapFromRawBytes(data,mTakenPhotoView.getWidth(),mTakenPhotoView.getHeight()));
}

Fixed version (ground truth):
@Override public void onPictureTaken(byte[] data,Camera camera){
  showPicture(PictureUtils.bitmapFromRawBytes(data,mPictureView.getWidth(),mPictureView.getHeight()));
}
Program: 85491
Project: 85491
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_basic_picture_taking);
  mPreviewSurfaceView=(SurfaceView)findViewById(R.id.preview_surface);
  mErrorTextView=(TextView)findViewById(R.id.error_text);
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_basic_picture_taking);
  mPreviewSurface=(SurfaceView)findViewById(R.id.preview_surface);
  mErrorTextView=(TextView)findViewById(R.id.error_text);
  mPictureView=(ImageView)findViewById(R.id.picture_taken);
  mCaptureButton=(ImageButton)findViewById(R.id.capture_button);
  mCaptureButton.setOnClickListener(this);
  mHidePictureDelay=getResources().getInteger(R.integer.picture_taken_show_duration);
  mHandler=new Handler(Looper.getMainLooper());
}
Program: 85492
Project: 85492
Buggy source:
/** 
 * Starts the camera preview using our already-created surface.
 */
private void startPreview(){
  try {
    mCamera.setPreviewDisplay(mSurfaceHolder);
    mCamera.startPreview();
  }
 catch (  IOException e) {
    showError(R.string.error_preview_not_started);
  }
}

Fixed version (ground truth):
/** 
 * Starts the camera preview using our already-created surface or shows an error message if there was a problem starting the preview.
 */
private void startPreview(){
  try {
    mCamera.setPreviewDisplay(mSurfaceHolder);
    mCamera.startPreview();
  }
 catch (  IOException e) {
    showError(R.string.error_preview_not_started);
  }
}
Program: 85493
Project: 85493
Buggy source:
/** 
 * Open the first back-facing camera and grab a   {@link android.hardware.Camera} instance.
 * @return A {@link android.hardware.Camera} instance for setting up the device camera andtaking pictures.
 */
private Camera openCamera(){
  return Camera.open();
}

Fixed version (ground truth):
/** 
 * Open the first back-facing camera and grab a   {@link android.hardware.Camera} instance.
 */
private void openCamera(){
  if (mCamera == null) {
    mCamera=Camera.open();
  }
}
Program: 85494
Project: 85494
Buggy source:
@Override protected void onPause(){
  super.onPause();
  if (mSurfaceHolder != null) {
    mSurfaceHolder.removeCallback(this);
  }
  closeCamera();
}

Fixed version (ground truth):
@Override protected void onPause(){
  super.onPause();
  if (mSurfaceHolder != null) {
    mSurfaceHolder.removeCallback(this);
  }
  closeCamera();
  mHandler.removeCallbacks(mHidePictureRunnable);
  hidePictureTaken();
}
Program: 85495
Project: 85495
Buggy source:
@Override protected void onResume(){
  super.onResume();
  if (hasCamera()) {
    mCamera=openCamera();
    mSurfaceHolder=mPreviewSurfaceView != null ? mPreviewSurfaceView.getHolder() : null;
    if (mSurfaceHolder != null) {
      mSurfaceHolder.addCallback(this);
      if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
        mSurfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
      }
      hideError();
    }
 else {
      showError(R.string.error_preview_surface_view_does_not_exist);
    }
  }
}

Fixed version (ground truth):
@Override protected void onResume(){
  super.onResume();
  if (hasCamera()) {
    openCamera();
    mSurfaceHolder=mPreviewSurface != null ? mPreviewSurface.getHolder() : null;
    if (mSurfaceHolder != null) {
      mSurfaceHolder.addCallback(this);
      if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
        mSurfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
      }
      hideError();
    }
 else {
      showError(R.string.error_preview_surface_view_does_not_exist);
    }
  }
}
Program: 85496
Project: 85496
Buggy source:
/** 
 * Hides the error message text and show the camera preview.
 */
private void hideError(){
  mErrorTextView.setVisibility(View.GONE);
  mPreviewSurfaceView.setVisibility(View.VISIBLE);
}

Fixed version (ground truth):
/** 
 * Hides the error message text and show the camera preview.
 */
private void hideError(){
  mErrorTextView.setVisibility(View.GONE);
  mPreviewSurface.setVisibility(View.VISIBLE);
}
Program: 85497
Project: 85497
Buggy source:
/** 
 * Show an error message text and hide the camera preview.
 * @param errorResourceId A resource ID for the error string resource.
 */
private void showError(int errorResourceId){
  mErrorTextView.setText(errorResourceId);
  mErrorTextView.setVisibility(View.VISIBLE);
  mPreviewSurfaceView.setVisibility(View.GONE);
}

Fixed version (ground truth):
/** 
 * Show an error message text and hide the camera preview.
 * @param errorResourceId A resource ID for the error string resource.
 */
private void showError(int errorResourceId){
  mErrorTextView.setText(errorResourceId);
  mErrorTextView.setVisibility(View.VISIBLE);
  mPreviewSurface.setVisibility(View.GONE);
}
Program: 85498
Project: 85498
Buggy source:
@Override public void surfaceCreated(SurfaceHolder holder){
  startPreview();
}

Fixed version (ground truth):
@Override public void surfaceCreated(SurfaceHolder holder){
  openCamera();
  startPreview();
}
Program: 85500
Project: 85500
Buggy source:
/** 
 * Creates options for the command line
 * @return Options
 */
private static Options createOptions(){
  final Options options=new Options();
  options.addOption("String_Node_Str","String_Node_Str",false,"String_Node_Str");
  options.addOption("String_Node_Str","String_Node_Str",true,"String_Node_Str");
  options.addOption("String_Node_Str","String_Node_Str",false,"String_Node_Str");
  options.addOption("String_Node_Str","String_Node_Str",true,"String_Node_Str");
  options.addOption("String_Node_Str","String_Node_Str",false,"String_Node_Str");
  options.addOption("String_Node_Str","String_Node_Str",true,"String_Node_Str");
  options.addOption("String_Node_Str","String_Node_Str",false,"String_Node_Str");
  options.addOption("String_Node_Str","String_Node_Str",false,"String_Node_Str");
  options.addOption("String_Node_Str","String_Node_Str",true,"String_Node_Str");
  options.addOption("String_Node_Str","String_Node_Str",true,"String_Node_Str");
  options.addOption("String_Node_Str",false,"String_Node_Str");
  return options;
}

Fixed version (ground truth):
/** 
 * Creates options for the command line
 * @return Options
 */
private static Options createOptions(){
  final Options options=new Options();
  options.addOption("String_Node_Str","String_Node_Str",false,"String_Node_Str");
  options.addOption("String_Node_Str","String_Node_Str",true,"String_Node_Str");
  options.addOption("String_Node_Str","String_Node_Str",false,"String_Node_Str");
  options.addOption("String_Node_Str","String_Node_Str",true,"String_Node_Str");
  options.addOption("String_Node_Str","String_Node_Str",false,"String_Node_Str");
  options.addOption("String_Node_Str","String_Node_Str",true,"String_Node_Str");
  options.addOption("String_Node_Str","String_Node_Str",false,"String_Node_Str");
  options.addOption("String_Node_Str","String_Node_Str",true,"String_Node_Str");
  options.addOption("String_Node_Str","String_Node_Str",true,"String_Node_Str");
  options.addOption("String_Node_Str",false,"String_Node_Str");
  return options;
}
Program: 85506
Project: 85506
Buggy source:
private static void addDefaultParam(final Column column){
  column.setFunction("String_Node_Str");
  final List<Parameter> params=new ArrayList<>();
  final Parameter param=new Parameter();
  param.setName("String_Node_Str");
  param.setValue("String_Node_Str");
  param.setType("String_Node_Str");
  params.add(param);
  column.setParameters(params);
}

Fixed version (ground truth):
private static void addDefaultParam(final String table,final Column column){
  column.setFunction("String_Node_Str");
  final List<Parameter> params=new ArrayList<>();
  final Parameter param=new Parameter();
  param.setName("String_Node_Str");
  param.setValue(table + "String_Node_Str" + column.getName()+ "String_Node_Str");
  param.setType(column.getReturnType());
  params.add(param);
  column.setParameters(params);
}
Program: 85511
Project: 85511
Buggy source:
/** 
 * Generates random 9-digit student number 
 * @param data
 * @param text
 * @return String
 */
public static MatchMetaData isPHITerm(final MatchMetaData data,final String text){
  if (CommonUtils.isEmptyString(text)) {
    return null;
  }
  if (data.getColumnType().equals("String_Node_Str") && phiList.contains(text.trim().toUpperCase(Locale.ENGLISH))) {
    log.info("String_Node_Str" + text);
    data.setModel("String_Node_Str");
    data.setAverageProbability(1);
    return data;
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Generates random 9-digit student number 
 * @param data
 * @param text
 * @return String
 */
public static MatchMetaData isPHITerm(final MatchMetaData data,final String text){
  if (CommonUtils.isEmptyString(text)) {
    return null;
  }
  if (data.getColumnType().equals("String_Node_Str") && phiList.contains(text.trim().toLowerCase(Locale.ENGLISH))) {
    log.info("String_Node_Str" + text);
    data.setModel("String_Node_Str");
    data.setAverageProbability(100);
    List<Probability> probabilityList=new ArrayList();
    probabilityList.add(new Probability(text,1.00));
    data.setProbabilityList(probabilityList);
    return data;
  }
  return null;
}
Program: 85514
Project: 85514
Buggy source:
public static int rowCount(final IDBFactory factory,final String tableName){
  final ISQLBuilder sqlBuilder=factory.createSQLBuilder();
  final String table=sqlBuilder.prefixSchema(tableName);
  final String queryCount=sqlBuilder.buildSelectWithLimit("String_Node_Str" + "String_Node_Str" + table,0);
  log.debug("String_Node_Str" + queryCount);
  int rowCount=0;
  try (Statement stmt=factory.getConnection().createStatement();ResultSet resultSet=stmt.executeQuery(queryCount)){
    resultSet.next();
    rowCount=resultSet.getInt(1);
  }
 catch (  SQLException sqle) {
    log.error(sqle.toString());
  }
  return rowCount;
}

Fixed version (ground truth):
public static int rowCount(final IDBFactory factory,final String tableName){
  final ISQLBuilder sqlBuilder=factory.createSQLBuilder();
  final int limit=100;
  final String table=sqlBuilder.prefixSchema(tableName);
  final String queryCount=sqlBuilder.buildSelectWithLimit("String_Node_Str" + "String_Node_Str" + table,limit);
  log.debug("String_Node_Str" + queryCount);
  int rowCount=0;
  try (Statement stmt=factory.getConnection().createStatement();ResultSet resultSet=stmt.executeQuery(queryCount)){
    resultSet.next();
    rowCount=resultSet.getInt(1);
  }
 catch (  SQLException sqle) {
    log.error(sqle.toString());
  }
  return rowCount;
}
Program: 85517
Project: 85517
Buggy source:
/** 
 * Creates the UPDATE query for a single row of results.
 * @param table
 * @param columns
 * @param keys
 * @param updatableKeys
 * @return the SQL statement
 */
private String getUpdateQuery(final Table table,final Collection<String> updateColumns,final Collection<String> keys){
  final StringBuilder sql=new StringBuilder();
  sql.append("String_Node_Str").append(table.getName()).append("String_Node_Str").append(StringUtils.join(updateColumns,"String_Node_Str")).append("String_Node_Str").append("String_Node_Str").append(StringUtils.join(keys,"String_Node_Str")).append("String_Node_Str");
  return sql.toString();
}

Fixed version (ground truth):
/** 
 * Creates the UPDATE query for a single row of results.
 * @param table
 * @param columns
 * @param keys
 * @param updatableKeys
 * @return the SQL statement
 */
private String getUpdateQuery(final Table table,final Collection<String> updateColumns,final Collection<String> keys){
  final StringBuilder sql=new StringBuilder();
  sql.append("String_Node_Str").append(table.getName()).append("String_Node_Str").append(StringUtils.join(updateColumns,"String_Node_Str")).append("String_Node_Str").append("String_Node_Str").append(StringUtils.join(keys,"String_Node_Str")).append("String_Node_Str");
  log.info(sql.toString());
  return sql.toString();
}
Program: 85522
Project: 85522
Buggy source:
@Override protected ResultSet getTableRS(DatabaseMetaData md) throws SQLException {
  return md.getTables(null,null,"String_Node_Str",null);
}

Fixed version (ground truth):
@Override protected ResultSet getTableRS(DatabaseMetaData md) throws SQLException {
  return md.getTables(null,null,"String_Node_Str",new String[]{"String_Node_Str"});
}
Program: 85523
Project: 85523
Buggy source:
@Test public void testHappyPath() throws DatabaseAnonymizerException, SQLException {
  when(mockConnection.getMetaData()).thenReturn(mockMetaData);
  when(mockMetaData.getTables(null,null,"String_Node_Str",null)).thenReturn(mockTableRS);
  when(mockMetaData.getPrimaryKeys(null,null,table)).thenReturn(mockPKRS);
  when(mockMetaData.getColumns(null,null,table,null)).thenReturn(mockColumnRS);
  when(mockTableRS.getString(3)).thenReturn(table);
  when(mockTableRS.next()).thenReturn(true).thenReturn(false);
  when(mockPKRS.getString(4)).thenReturn("String_Node_Str");
  when(mockPKRS.next()).thenReturn(true).thenReturn(false);
  when(mockColumnRS.next()).thenReturn(true).thenReturn(false);
  when(mockColumnRS.getString("String_Node_Str")).thenReturn("String_Node_Str");
  when(mockColumnRS.getString(6)).thenReturn("String_Node_Str");
  MetaData metaData=new TestMSQLMetaData(testProperties);
  List<MatchMetaData> result=metaData.getMetaData();
  assertEquals(1,result.size());
  assertEquals(table,result.get(0).getTableName());
  assertEquals(Arrays.asList("String_Node_Str"),result.get(0).getPkeys());
  assertEquals("String_Node_Str",result.get(0).getColumnName());
  assertEquals("String_Node_Str",result.get(0).getColumnType());
  verify(mockTableRS,times(1)).close();
  verify(mockColumnRS,times(1)).close();
}

Fixed version (ground truth):
@Test public void testHappyPath() throws DatabaseAnonymizerException, SQLException {
}