nus-yam/ex-repair huggingface dataset:
Program: 525
Project: 525
Buggy source:
/** 
 * This method must be called once shortly after instantiation to fully initialize the node and make it ready for rendering.
 */
@Override public void initialise(){
  addDesiredStateChange(new BindFBO(READ_ONLY_GBUFFER.getName(),displayResolutionDependentFBOs));
  addDesiredStateChange(new SetViewportToSizeOf(READ_ONLY_GBUFFER.getName(),displayResolutionDependentFBOs));
  addDesiredStateChange(new EnableBlending());
  addDesiredStateChange(new SetBlendFunction(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA));
  addDesiredStateChange(new DisableDepthWriting());
}

Fixed version (ground truth):
/** 
 * This method must be called once shortly after instantiation to fully initialize the node and make it ready for rendering.
 */
@Override public void initialise(){
  Camera playerCamera=worldRenderer.getActiveCamera();
  addDesiredStateChange(new LookThrough(playerCamera));
  addDesiredStateChange(new BindFBO(READ_ONLY_GBUFFER.getName(),displayResolutionDependentFBOs));
  addDesiredStateChange(new SetViewportToSizeOf(READ_ONLY_GBUFFER.getName(),displayResolutionDependentFBOs));
  addDesiredStateChange(new EnableBlending());
  addDesiredStateChange(new SetBlendFunction(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA));
  addDesiredStateChange(new DisableDepthWriting());
}
Program: 526
Project: 526
Buggy source:
@Override public String get(){
  StringBuilder messageList=new StringBuilder();
  for (  Message msg : console.getMessages(CoreMessageType.CHAT,CoreMessageType.NOTIFICATION)) {
    messageList.append(msg.getMessage());
    messageList.append(Console.NEW_LINE);
  }
  return messageList.toString();
}

Fixed version (ground truth):
@Override public String get(){
  StringBuilder messageList=new StringBuilder();
  for (Iterator<Message> it=console.getMessages(CoreMessageType.CHAT,CoreMessageType.NOTIFICATION).iterator(); it.hasNext(); ) {
    messageList.append(it.next().getMessage());
    if (it.hasNext()) {
      messageList.append(Console.NEW_LINE);
    }
  }
  return messageList.toString();
}
Program: 527
Project: 527
Buggy source:
@Override public void initialise(){
  final ScrollableArea scrollArea=find("String_Node_Str",ScrollableArea.class);
  scrollArea.moveToBottom();
  commandLine=find("String_Node_Str",UIText.class);
  getManager().setFocus(commandLine);
  commandLine.subscribe(widget -> {
    String text=commandLine.getText();
    if (!text.isEmpty()) {
      String command="String_Node_Str";
      List<String> params=Collections.singletonList(text);
      console.execute(new Name(command),params,localPlayer.getClientEntity());
      commandLine.setText("String_Node_Str");
      scrollArea.moveToBottom();
      MiniChatOverlay overlay=nuiManager.addOverlay("String_Node_Str",MiniChatOverlay.class);
      overlay.setVisible(true);
      nuiManager.closeScreen(this);
    }
  }
);
  final UILabel history=find("String_Node_Str",UILabel.class);
  history.bindText(new ReadOnlyBinding<String>(){
    @Override public String get(){
      StringBuilder messageList=new StringBuilder();
      for (      Message msg : console.getMessages(CoreMessageType.CHAT,CoreMessageType.NOTIFICATION)) {
        messageList.append(msg.getMessage());
        messageList.append(Console.NEW_LINE);
      }
      return messageList.toString();
    }
  }
);
}

Fixed version (ground truth):
@Override public void initialise(){
  final ScrollableArea scrollArea=find("String_Node_Str",ScrollableArea.class);
  scrollArea.moveToBottom();
  commandLine=find("String_Node_Str",UIText.class);
  getManager().setFocus(commandLine);
  commandLine.subscribe(widget -> {
    String text=commandLine.getText();
    if (!text.isEmpty()) {
      String command="String_Node_Str";
      List<String> params=Collections.singletonList(text);
      console.execute(new Name(command),params,localPlayer.getClientEntity());
      commandLine.setText("String_Node_Str");
      scrollArea.moveToBottom();
      MiniChatOverlay overlay=nuiManager.addOverlay("String_Node_Str",MiniChatOverlay.class);
      overlay.setVisible(true);
      nuiManager.closeScreen(this);
    }
  }
);
  final UILabel history=find("String_Node_Str",UILabel.class);
  history.bindText(new ReadOnlyBinding<String>(){
    @Override public String get(){
      StringBuilder messageList=new StringBuilder();
      for (Iterator<Message> it=console.getMessages(CoreMessageType.CHAT,CoreMessageType.NOTIFICATION).iterator(); it.hasNext(); ) {
        messageList.append(it.next().getMessage());
        if (it.hasNext()) {
          messageList.append(Console.NEW_LINE);
        }
      }
      return messageList.toString();
    }
  }
);
}
Program: 528
Project: 528
Buggy source:
@Override public String get(){
  Iterable<Message> msgs=console.getMessages(CoreMessageType.CHAT,CoreMessageType.NOTIFICATION);
  StringBuilder messageHistory=new StringBuilder();
  int count=1;
  int size=Iterables.size(msgs);
  for (  Message msg : msgs) {
    if (count > size - MAX_MESSAGES) {
      messageHistory.append(msg.getMessage());
      if (count < size) {
        messageHistory.append(Console.NEW_LINE);
      }
    }
    count++;
  }
  return messageHistory.toString();
}

Fixed version (ground truth):
@Override public String get(){
  Iterable<Message> msgs=console.getMessages(CoreMessageType.CHAT,CoreMessageType.NOTIFICATION);
  StringBuilder messageHistory=new StringBuilder();
  int count=1;
  int size=Iterables.size(msgs);
  for (  Message msg : msgs) {
    if (count > size - MAX_MESSAGES) {
      messageHistory.append(StringUtils.abbreviate(msg.getMessage(),MAX_CHAR_PER_MSG));
      if (count < size) {
        messageHistory.append(Console.NEW_LINE);
      }
    }
    count++;
  }
  return messageHistory.toString();
}
Program: 529
Project: 529
Buggy source:
@Override public void initialise(){
  message=find("String_Node_Str",UILabel.class);
  message.bindText(new ReadOnlyBinding<String>(){
    @Override public String get(){
      Iterable<Message> msgs=console.getMessages(CoreMessageType.CHAT,CoreMessageType.NOTIFICATION);
      StringBuilder messageHistory=new StringBuilder();
      int count=1;
      int size=Iterables.size(msgs);
      for (      Message msg : msgs) {
        if (count > size - MAX_MESSAGES) {
          messageHistory.append(msg.getMessage());
          if (count < size) {
            messageHistory.append(Console.NEW_LINE);
          }
        }
        count++;
      }
      return messageHistory.toString();
    }
  }
);
}

Fixed version (ground truth):
@Override public void initialise(){
  message=find("String_Node_Str",UILabel.class);
  message.bindText(new ReadOnlyBinding<String>(){
    @Override public String get(){
      Iterable<Message> msgs=console.getMessages(CoreMessageType.CHAT,CoreMessageType.NOTIFICATION);
      StringBuilder messageHistory=new StringBuilder();
      int count=1;
      int size=Iterables.size(msgs);
      for (      Message msg : msgs) {
        if (count > size - MAX_MESSAGES) {
          messageHistory.append(StringUtils.abbreviate(msg.getMessage(),MAX_CHAR_PER_MSG));
          if (count < size) {
            messageHistory.append(Console.NEW_LINE);
          }
        }
        count++;
      }
      return messageHistory.toString();
    }
  }
);
}
Program: 530
Project: 530
Buggy source:
private void sectionSelected(){
  sections[submenuLayer][selectedTab].setSelected(false);
  sections[submenuLayer][selectedTab].activateSection();
  selectedTab=-1;
}

Fixed version (ground truth):
private void sectionSelected(){
  sections[submenuLayer][selectedTab].setSelected(false);
  sections[submenuLayer][selectedTab].activateSection();
}
Program: 531
Project: 531
Buggy source:
@Override public void onDraw(Canvas canvas){
  if (!hasInitialised) {
    hasInitialised=true;
    initialise(canvas);
  }
  canvas.addInteractionRegion(baseInteractionListener);
  canvas.drawBackground();
  for (  UIRadialSection section : sections[submenuLayer]) {
    if (section != null) {
      canvas.drawWidget(section);
    }
  }
}

Fixed version (ground truth):
@Override public void onDraw(Canvas canvas){
  if (!hasInitialised) {
    hasInitialised=true;
    initialise(canvas);
  }
  canvas.addInteractionRegion(baseInteractionListener);
  canvas.drawTexture(Assets.getTextureRegion("String_Node_Str").get());
  for (  UIRadialSection section : sections[submenuLayer]) {
    if (section != null) {
      canvas.drawWidget(section);
    }
  }
}
Program: 532
Project: 532
Buggy source:
@Override public void onMouseDrag(NUIMouseDragEvent event){
  Vector2i pos=event.getRelativeMousePosition();
  pos=new Vector2i(pos.x() - (int)radius,pos.y() - (int)radius);
  double angle=Math.atan2(pos.y(),pos.x());
  if (angle < 0) {
    angle+=Math.PI * 2;
  }
  int newTab=(int)Math.floor((angle * 10) / 8);
  if (selectedTab != newTab) {
    if (selectedTab != -1) {
      sections[submenuLayer][selectedTab].setSelected(false);
    }
    sections[submenuLayer][newTab].setSelected(true);
    selectedTab=newTab;
  }
  if (Math.sqrt(pos.x() * pos.x() + pos.y() * pos.y()) > radius && selectedTab != -1) {
    sectionSelected();
  }
}

Fixed version (ground truth):
@Override public void onMouseDrag(NUIMouseDragEvent event){
}
Program: 533
Project: 533
Buggy source:
public void initialise(Canvas canvas){
  region=canvas.getRegion();
  int ringWidth=(int)(0.2578125 * region.width() * 2);
  int innerRadius=(int)(0.2421875 * region.width() * 2);
  radius=ringWidth + innerRadius;
  logger.info("String_Node_Str" + radius);
  Rect2i infoRegion=Rect2i.createFromMinAndSize(region.width() / 2,region.height() / 2,innerRadius * 2,innerRadius * 2);
  for (int q=0; q < sections.length; q++) {
    for (int i=0; i < 8; i++) {
      if (sections[submenuLayer][i] != null) {
        double offset=innerRadius + ringWidth * q;
        logger.info(offset + "String_Node_Str");
        sections[submenuLayer][i].setCenter(Rect2i.createFromMinAndSize((int)(Math.cos(i * Math.PI / 4 + Math.PI / 8) * offset) + region.width() / 2 - ringWidth / 2,(int)(Math.sin(i * Math.PI / 4 + Math.PI / 8) * offset) + region.width() / 2 - ringWidth / 2,ringWidth,ringWidth));
        sections[submenuLayer][i].setSelectedTexture(Assets.getTextureRegion("String_Node_Str" + i).get());
        sections[submenuLayer][i].setSectionTexture(Assets.getTextureRegion("String_Node_Str" + i).get());
        sections[submenuLayer][i].setInfoRegion(infoRegion);
      }
 else {
        sections[submenuLayer][i]=new UIRadialEmpty();
      }
    }
  }
}

Fixed version (ground truth):
public void initialise(Canvas canvas){
  region=canvas.getRegion();
  int ringWidth=(int)(0.2578125 * region.width());
  int innerRadius=(int)(0.2421875 * region.width());
  double offset=innerRadius + ringWidth / 2;
  radius=ringWidth + innerRadius;
  Rect2i infoRegion=Rect2i.createFromMinAndSize(region.width() / 2,region.height() / 2,innerRadius * 2,innerRadius * 2);
  for (int q=0; q < sections.length; q++) {
    for (int i=0; i < 8; i++) {
      if (sections[q][i] != null) {
        sections[q][i].setCenter(Rect2i.createFromMinAndSize((int)(Math.cos(i * Math.PI / 4 + Math.PI / 8) * offset),(int)(Math.sin(i * Math.PI / 4 + Math.PI / 8) * offset),region.width() / 2,region.height() / 2));
        sections[q][i].setSelectedTexture(Assets.getTextureRegion("String_Node_Str" + i).get());
        sections[q][i].setSectionTexture(Assets.getTextureRegion("String_Node_Str" + i).get());
        sections[q][i].setInfoRegion(infoRegion);
      }
 else {
        sections[q][i]=new UIRadialEmpty();
      }
    }
  }
}
Program: 534
Project: 534
Buggy source:
@Override public void onMouseRelease(NUIMouseReleaseEvent event){
  if (selectedTab != -1) {
    sectionSelected();
    submenuLayer=0;
  }
}

Fixed version (ground truth):
@Override public void onMouseRelease(NUIMouseReleaseEvent event){
  if (selectedTab != -1) {
    sectionSelected();
    if (sections[submenuLayer][selectedTab].getIsSubmenu()) {
      submenuLayer=sections[submenuLayer][selectedTab].getSubmenu();
    }
 else {
      selectedTab=-1;
    }
  }
}
Program: 535
Project: 535
Buggy source:
public boolean getIsSubmenu(){
  return info instanceof UIRadialSection;
}

Fixed version (ground truth):
public boolean getIsSubmenu(){
  return submenu != -1;
}
Program: 536
Project: 536
Buggy source:
public void onDraw(Canvas canvas){
  canvas.getRegion();
  if (icon != null) {
    canvas.drawTexture(icon,sectionRegion);
  }
  canvas.drawTexture(sectionTexture,sectionRegion);
  if (text != null) {
    canvas.drawText(text,sectionRegion);
  }
  if (isSelected) {
    canvas.drawTexture(selectedTexture,canvas.getRegion());
    canvas.drawWidget(info,infoRegion);
  }
}

Fixed version (ground truth):
public void onDraw(Canvas canvas){
  canvas.getRegion();
  canvas.drawTexture(sectionTexture,sectionRegion);
  if (icon != null) {
  }
  if (text != null) {
  }
  if (isSelected) {
    canvas.drawTexture(selectedTexture,sectionRegion);
    canvas.drawWidget(info,infoRegion);
  }
}
Program: 537
Project: 537
Buggy source:
@Command(shortDescription="String_Node_Str",requiredPermission=PermissionManager.CHEAT_PERMISSION) public String listShapes(@CommandParam(value="String_Node_Str",required=false) String[] startsWith){
  StringBuilder stringBuilder=new StringBuilder();
  stringBuilder.append("String_Node_Str");
  stringBuilder.append(Console.NEW_LINE);
  stringBuilder.append("String_Node_Str");
  stringBuilder.append(Console.NEW_LINE);
  List<ResourceUrn> sortedUris=sortItems(Assets.list(BlockShape.class));
  for (  ResourceUrn uri : sortedUris) {
    if (!uriStartsWithAnyString(uri.toString(),startsWith)) {
      continue;
    }
    stringBuilder.append(uri.toString());
    stringBuilder.append(Console.NEW_LINE);
  }
  return stringBuilder.toString();
}

Fixed version (ground truth):
@Command(shortDescription="String_Node_Str" + "String_Node_Str",requiredPermission=PermissionManager.CHEAT_PERMISSION) public String listShapes(@CommandParam(value="String_Node_Str",required=false) String[] startsWith){
  StringBuilder stringBuilder=new StringBuilder();
  stringBuilder.append("String_Node_Str");
  stringBuilder.append(Console.NEW_LINE);
  stringBuilder.append("String_Node_Str");
  stringBuilder.append(Console.NEW_LINE);
  List<ResourceUrn> sortedUris=sortItems(Assets.list(BlockShape.class));
  for (  ResourceUrn uri : sortedUris) {
    if (!uriStartsWithAnyString(uri.toString(),startsWith)) {
      continue;
    }
    stringBuilder.append(uri.toString());
    stringBuilder.append(Console.NEW_LINE);
  }
  return stringBuilder.toString();
}
Program: 538
Project: 538
Buggy source:
@Command(shortDescription="String_Node_Str",requiredPermission=PermissionManager.CHEAT_PERMISSION) public String listItems(@CommandParam(value="String_Node_Str",required=false) String[] startsWith){
  List<String> stringItems=Lists.newArrayList();
  for (  Prefab prefab : prefabManager.listPrefabs()) {
    if (!uriStartsWithAnyString(prefab.getName(),startsWith)) {
      continue;
    }
    stringItems.add(prefab.getName());
  }
  Collections.sort(stringItems);
  StringBuilder items=new StringBuilder();
  for (  String item : stringItems) {
    if (!items.toString().isEmpty()) {
      items.append(Console.NEW_LINE);
    }
    items.append(item);
  }
  return items.toString();
}

Fixed version (ground truth):
@Command(shortDescription="String_Node_Str" + "String_Node_Str",requiredPermission=PermissionManager.CHEAT_PERMISSION) public String listItems(@CommandParam(value="String_Node_Str",required=false) String[] startsWith){
  List<String> stringItems=Lists.newArrayList();
  for (  Prefab prefab : prefabManager.listPrefabs()) {
    if (!uriStartsWithAnyString(prefab.getName(),startsWith)) {
      continue;
    }
    stringItems.add(prefab.getName());
  }
  Collections.sort(stringItems);
  StringBuilder items=new StringBuilder();
  for (  String item : stringItems) {
    if (!items.toString().isEmpty()) {
      items.append(Console.NEW_LINE);
    }
    items.append(item);
  }
  return items.toString();
}
Program: 539
Project: 539
Buggy source:
/** 
 * Used to check if an item/prefab/etc name starts with a string that is in   {@code uri}
 * @param uri the name to be checked
 * @param startsWithArray array of possible word to match at the beginning of {@code uri}
 * @return true if {@code startsWithArray} is null, empty or {@code uri} starts with one of the elements in it
 */
private boolean uriStartsWithAnyString(String uri,String[] startsWithArray){
  if (startsWithArray == null || startsWithArray.length == 0) {
    return true;
  }
  for (  String startsWith : startsWithArray) {
    if (uri.startsWith(startsWith))     return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Used to check if an item/prefab/etc name starts with a string that is in   {@code uri}
 * @param uri the name to be checked
 * @param startsWithArray array of possible word to match at the beginning of {@code uri}
 * @return true if {@code startsWithArray} is null, empty or {@code uri} starts with one of the elements in it
 */
private boolean uriStartsWithAnyString(String uri,String[] startsWithArray){
  if (startsWithArray == null || startsWithArray.length == 0) {
    return true;
  }
  for (  String startsWith : startsWithArray) {
    if (uri.startsWith(startsWith)) {
      return true;
    }
  }
  return false;
}
Program: 540
Project: 540
Buggy source:
@Command(shortDescription="String_Node_Str",requiredPermission=PermissionManager.CHEAT_PERMISSION) public String listBlocks(@CommandParam(value="String_Node_Str",required=false) String[] startsWith){
  StringBuilder stringBuilder=new StringBuilder();
  stringBuilder.append("String_Node_Str");
  stringBuilder.append(Console.NEW_LINE);
  stringBuilder.append("String_Node_Str");
  stringBuilder.append(Console.NEW_LINE);
  List<BlockUri> registeredBlocks=sortItems(blockManager.listRegisteredBlockUris());
  for (  BlockUri blockUri : registeredBlocks) {
    if (!uriStartsWithAnyString(blockUri.toString(),startsWith)) {
      continue;
    }
    stringBuilder.append(blockUri.toString());
    stringBuilder.append(Console.NEW_LINE);
  }
  stringBuilder.append(Console.NEW_LINE);
  stringBuilder.append("String_Node_Str");
  stringBuilder.append(Console.NEW_LINE);
  stringBuilder.append("String_Node_Str");
  stringBuilder.append(Console.NEW_LINE);
  List<BlockUri> availableBlocks=sortItems(blockExplorer.getAvailableBlockFamilies());
  for (  BlockUri blockUri : availableBlocks) {
    if (!uriStartsWithAnyString(blockUri.toString(),startsWith)) {
      continue;
    }
    stringBuilder.append(blockUri.toString());
    stringBuilder.append(Console.NEW_LINE);
  }
  return stringBuilder.toString();
}

Fixed version (ground truth):
@Command(shortDescription="String_Node_Str" + "String_Node_Str",requiredPermission=PermissionManager.CHEAT_PERMISSION) public String listBlocks(@CommandParam(value="String_Node_Str",required=false) String[] startsWith){
  StringBuilder stringBuilder=new StringBuilder();
  stringBuilder.append("String_Node_Str");
  stringBuilder.append(Console.NEW_LINE);
  stringBuilder.append("String_Node_Str");
  stringBuilder.append(Console.NEW_LINE);
  List<BlockUri> registeredBlocks=sortItems(blockManager.listRegisteredBlockUris());
  for (  BlockUri blockUri : registeredBlocks) {
    if (!uriStartsWithAnyString(blockUri.toString(),startsWith)) {
      continue;
    }
    stringBuilder.append(blockUri.toString());
    stringBuilder.append(Console.NEW_LINE);
  }
  stringBuilder.append(Console.NEW_LINE);
  stringBuilder.append("String_Node_Str");
  stringBuilder.append(Console.NEW_LINE);
  stringBuilder.append("String_Node_Str");
  stringBuilder.append(Console.NEW_LINE);
  List<BlockUri> availableBlocks=sortItems(blockExplorer.getAvailableBlockFamilies());
  for (  BlockUri blockUri : availableBlocks) {
    if (!uriStartsWithAnyString(blockUri.toString(),startsWith)) {
      continue;
    }
    stringBuilder.append(blockUri.toString());
    stringBuilder.append(Console.NEW_LINE);
  }
  return stringBuilder.toString();
}
Program: 541
Project: 541
Buggy source:
@Command(shortDescription="String_Node_Str",helpText="String_Node_Str",requiredPermission=PermissionManager.CHEAT_PERMISSION) public String listFreeShapeBlocks(@CommandParam(value="String_Node_Str",required=false) String[] startsWith){
  StringBuilder stringBuilder=new StringBuilder();
  stringBuilder.append("String_Node_Str");
  stringBuilder.append(Console.NEW_LINE);
  stringBuilder.append("String_Node_Str");
  stringBuilder.append(Console.NEW_LINE);
  List<BlockUri> sortedUris=sortItems(blockExplorer.getFreeformBlockFamilies());
  for (  BlockUri uri : sortedUris) {
    if (!uriStartsWithAnyString(uri.toString(),startsWith)) {
      continue;
    }
    stringBuilder.append(uri.toString());
    stringBuilder.append(Console.NEW_LINE);
  }
  return stringBuilder.toString();
}

Fixed version (ground truth):
@Command(shortDescription="String_Node_Str",helpText="String_Node_Str" + "String_Node_Str" + "String_Node_Str",requiredPermission=PermissionManager.CHEAT_PERMISSION) public String listFreeShapeBlocks(@CommandParam(value="String_Node_Str",required=false) String[] startsWith){
  StringBuilder stringBuilder=new StringBuilder();
  stringBuilder.append("String_Node_Str");
  stringBuilder.append(Console.NEW_LINE);
  stringBuilder.append("String_Node_Str");
  stringBuilder.append(Console.NEW_LINE);
  List<BlockUri> sortedUris=sortItems(blockExplorer.getFreeformBlockFamilies());
  for (  BlockUri uri : sortedUris) {
    if (!uriStartsWithAnyString(uri.toString(),startsWith)) {
      continue;
    }
    stringBuilder.append(uri.toString());
    stringBuilder.append(Console.NEW_LINE);
  }
  return stringBuilder.toString();
}
Program: 542
Project: 542
Buggy source:
private void Type(boolean abort){
  this.abort=abort;
}

Fixed version (ground truth):
void Type(boolean abort){
  this.abort=abort;
}
Program: 543
Project: 543
Buggy source:
public TimeStepper(int cycles,long deltaPerCycle){
  this.cycles=cycles;
  this.deltaPerCycle=deltaPerCycle;
}

Fixed version (ground truth):
TimeStepper(int cycles,long deltaPerCycle){
  this.cycles=cycles;
  this.deltaPerCycle=deltaPerCycle;
}
Program: 544
Project: 544
Buggy source:
public PendingEvent(EntityRef entity,Event event,Component component){
  this.entity=entity;
  this.event=event;
  this.component=component;
}

Fixed version (ground truth):
PendingEvent(EntityRef entity,Event event,Component component){
  this.entity=entity;
  this.event=event;
  this.component=component;
}
Program: 545
Project: 545
Buggy source:
public DisposalAction(Translation asset){
  this.asset=new WeakReference<>(asset);
}

Fixed version (ground truth):
DisposalAction(Translation asset){
  this.asset=new WeakReference<>(asset);
}
Program: 546
Project: 546
Buggy source:
public PlayMusicTask(PlayMusicNode node){
  super(node);
}

Fixed version (ground truth):
PlayMusicTask(PlayMusicNode node){
  super(node);
}
Program: 547
Project: 547
Buggy source:
public SpawningClientInfo(EntityRef client,Vector3f position,PlayerStore playerStore){
  this(client,position);
  this.playerStore=playerStore;
}

Fixed version (ground truth):
SpawningClientInfo(EntityRef client,Vector3f position,PlayerStore playerStore){
  this(client,position);
  this.playerStore=playerStore;
}
Program: 548
Project: 548
Buggy source:
public SubtractiveIterator(Region3i other){
  this.other=other;
  innerIterator=iterator();
  updateNext();
}

Fixed version (ground truth):
SubtractiveIterator(Region3i other){
  this.other=other;
  innerIterator=iterator();
  updateNext();
}
Program: 549
Project: 549
Buggy source:
public Region3iIterator(){
  this.pos=new Vector3i();
}

Fixed version (ground truth):
Region3iIterator(){
  this.pos=new Vector3i();
}
Program: 550
Project: 550
Buggy source:
public ChunkRequest(ChunkMonitorEvent event){
  Preconditions.checkNotNull(event,"String_Node_Str");
  this.event=event;
}

Fixed version (ground truth):
ChunkRequest(ChunkMonitorEvent event){
  Preconditions.checkNotNull(event,"String_Node_Str");
  this.event=event;
}
Program: 551
Project: 551
Buggy source:
public RenderRequest(){
  this.fastResume=false;
}

Fixed version (ground truth):
RenderRequest(){
  this.fastResume=false;
}
Program: 552
Project: 552
Buggy source:
public ImageBuffer(){
}

Fixed version (ground truth):
ImageBuffer(){
}
Program: 553
Project: 553
Buggy source:
public ResizeRequest(int width,int height){
  this.width=width;
  this.height=height;
}

Fixed version (ground truth):
ResizeRequest(int width,int height){
  this.width=width;
  this.height=height;
}
Program: 554
Project: 554
Buggy source:
public ChunkStoreInternal(EntityData.ChunkStore chunkData,EngineEntityManager entityManager,BlockManager blockManager,BiomeManager biomeManager){
  this.chunkPosition=new Vector3i(chunkData.getX(),chunkData.getY(),chunkData.getZ());
  this.entityManager=entityManager;
  this.chunk=ChunkSerializer.decode(chunkData,blockManager,biomeManager);
  this.entityStore=chunkData.getStore();
}

Fixed version (ground truth):
ChunkStoreInternal(EntityData.ChunkStore chunkData,EngineEntityManager entityManager,BlockManager blockManager,BiomeManager biomeManager){
  this.chunkPosition=new Vector3i(chunkData.getX(),chunkData.getY(),chunkData.getZ());
  this.entityManager=entityManager;
  this.chunk=ChunkSerializer.decode(chunkData,blockManager,biomeManager);
  this.entityStore=chunkData.getStore();
}
Program: 555
Project: 555
Buggy source:
public EntityRestorer(EngineEntityManager entityManager){
  this.entityManager=entityManager;
}

Fixed version (ground truth):
EntityRestorer(EngineEntityManager entityManager){
  this.entityManager=entityManager;
}
Program: 556
Project: 556
Buggy source:
/** 
 * @param specialComponentLibrary must be a component library that uses a special copy strategy for entity refs.
 */
public EntitySetDeltaRecorder(ComponentLibrary specialComponentLibrary){
  this.componentLibrary=specialComponentLibrary;
}

Fixed version (ground truth):
/** 
 * @param specialComponentLibrary must be a component library that uses a special copy strategy for entity refs.
 */
EntitySetDeltaRecorder(ComponentLibrary specialComponentLibrary){
  this.componentLibrary=specialComponentLibrary;
}
Program: 557
Project: 557
Buggy source:
public EntityStorer(EngineEntityManager entityManager){
  this.entityStoreBuilder=EntityData.EntityStore.newBuilder();
  this.serializer=new EntitySerializer(entityManager);
  this.helper=new OwnershipHelper(entityManager.getComponentLibrary());
  Map<Class<? extends Component>,Integer> componentIds=Maps.newHashMap();
  for (  ComponentMetadata<?> componentMetadata : entityManager.getComponentLibrary().iterateComponentMetadata()) {
    entityStoreBuilder.addComponentClass(componentMetadata.getUri().toString());
    componentIds.put(componentMetadata.getType(),componentIds.size());
  }
  serializer.setComponentIdMapping(componentIds);
}

Fixed version (ground truth):
EntityStorer(EngineEntityManager entityManager){
  this.entityStoreBuilder=EntityData.EntityStore.newBuilder();
  this.serializer=new EntitySerializer(entityManager);
  this.helper=new OwnershipHelper(entityManager.getComponentLibrary());
  Map<Class<? extends Component>,Integer> componentIds=Maps.newHashMap();
  for (  ComponentMetadata<?> componentMetadata : entityManager.getComponentLibrary().iterateComponentMetadata()) {
    entityStoreBuilder.addComponentClass(componentMetadata.getUri().toString());
    componentIds.put(componentMetadata.getType(),componentIds.size());
  }
  serializer.setComponentIdMapping(componentIds);
}
Program: 558
Project: 558
Buggy source:
public GlobalStoreBuilder(EngineEntityManager entityManager,PrefabSerializer prefabSerializer){
  this.nextEntityId=entityManager.getNextId();
  this.prefabSerializer=prefabSerializer;
}

Fixed version (ground truth):
GlobalStoreBuilder(EngineEntityManager entityManager,PrefabSerializer prefabSerializer){
  this.nextEntityId=entityManager.getNextId();
  this.prefabSerializer=prefabSerializer;
}
Program: 559
Project: 559
Buggy source:
public GlobalStoreLoader(ModuleEnvironment environment,EngineEntityManager entityManager,PrefabSerializer prefabSerializer){
  this.entityManager=entityManager;
  this.prefabManager=entityManager.getPrefabManager();
  this.environment=environment;
  this.componentLibrary=entityManager.getComponentLibrary();
  this.entitySerializer=new EntitySerializer(entityManager);
  this.prefabSerializer=prefabSerializer;
}

Fixed version (ground truth):
GlobalStoreLoader(ModuleEnvironment environment,EngineEntityManager entityManager,PrefabSerializer prefabSerializer){
  this.entityManager=entityManager;
  this.prefabManager=entityManager.getPrefabManager();
  this.environment=environment;
  this.componentLibrary=entityManager.getComponentLibrary();
  this.entitySerializer=new EntitySerializer(entityManager);
  this.prefabSerializer=prefabSerializer;
}
Program: 560
Project: 560
Buggy source:
public EntityIterable(TLongList list){
  this.list=list;
}

Fixed version (ground truth):
EntityIterable(TLongList list){
  this.list=list;
}
Program: 561
Project: 561
Buggy source:
public EntityIterator(TLongIterator idIterator){
  this.idIterator=idIterator;
}

Fixed version (ground truth):
EntityIterator(TLongIterator idIterator){
  this.idIterator=idIterator;
}
Program: 562
Project: 562
Buggy source:
public EntityEntry(EntityRef ref,T value){
  this.key=ref;
  this.value=value;
}

Fixed version (ground truth):
EntityEntry(EntityRef ref,T value){
  this.key=ref;
  this.value=value;
}
Program: 563
Project: 563
Buggy source:
public MyRenderer(HeaderPanel header){
  this.header=Preconditions.checkNotNull(header,"String_Node_Str");
  setBackground(Color.white);
  setLayout(new FlowLayout(FlowLayout.LEFT,4,2));
  lMean.setHorizontalAlignment(SwingConstants.RIGHT);
  lMean.setForeground(Color.gray);
  lMean.setPreferredSize(header.lMean.getPreferredSize());
  lSpike.setHorizontalAlignment(SwingConstants.RIGHT);
  lSpike.setForeground(Color.gray);
  lSpike.setPreferredSize(header.lSpike.getPreferredSize());
  add(lName);
  add(lMean);
  add(lSpike);
}

Fixed version (ground truth):
MyRenderer(HeaderPanel header){
  this.header=Preconditions.checkNotNull(header,"String_Node_Str");
  setBackground(Color.white);
  setLayout(new FlowLayout(FlowLayout.LEFT,4,2));
  lMean.setHorizontalAlignment(SwingConstants.RIGHT);
  lMean.setForeground(Color.gray);
  lMean.setPreferredSize(header.lMean.getPreferredSize());
  lSpike.setHorizontalAlignment(SwingConstants.RIGHT);
  lSpike.setForeground(Color.gray);
  lSpike.setPreferredSize(header.lSpike.getPreferredSize());
  add(lName);
  add(lMean);
  add(lSpike);
}
Program: 564
Project: 564
Buggy source:
public Entry(String name){
  this.name=(name == null) ? "String_Node_Str" : name;
}

Fixed version (ground truth):
Entry(String name){
  this.name=(name == null) ? "String_Node_Str" : name;
}
Program: 565
Project: 565
Buggy source:
public HeaderPanel(){
  setLayout(new FlowLayout(FlowLayout.LEFT,4,2));
  add(lName);
  add(lMean);
  add(lSpike);
}

Fixed version (ground truth):
HeaderPanel(){
  setLayout(new FlowLayout(FlowLayout.LEFT,4,2));
  add(lName);
  add(lMean);
  add(lSpike);
}
Program: 566
Project: 566
Buggy source:
public PerformanceListRenderer(HeaderPanel header){
  renderer=new MyRenderer(header);
}

Fixed version (ground truth):
PerformanceListRenderer(HeaderPanel header){
  renderer=new MyRenderer(header);
}
Program: 567
Project: 567
Buggy source:
public UIWidgetTypeAdapter(NUIManager nuiManager){
  this.nuiManager=nuiManager;
}

Fixed version (ground truth):
UIWidgetTypeAdapter(NUIManager nuiManager){
  this.nuiManager=nuiManager;
}
Program: 568
Project: 568
Buggy source:
public I18nStringTypeAdapter(TranslationSystem translationSystem,Locale otherLocale){
  this.translationSystem=translationSystem;
  this.otherLocale=otherLocale;
}

Fixed version (ground truth):
I18nStringTypeAdapter(TranslationSystem translationSystem,Locale otherLocale){
  this.translationSystem=translationSystem;
  this.otherLocale=otherLocale;
}
Program: 569
Project: 569
Buggy source:
protected void refreshTaskList(){
  taskListGenerator.refresh();
}

Fixed version (ground truth):
protected void refreshTaskList(){
  if (taskListGenerator != null) {
    taskListGenerator.refresh();
  }
}
Program: 570
Project: 570
Buggy source:
@Override public void initialise(){
  super.initialise();
  playerCamera=worldRenderer.getActiveCamera();
  initSkysphere();
  addDesiredStateChange(new EnableMaterial("String_Node_Str"));
  addDesiredStateChange(new DisableDepthMask());
  addDesiredStateChange(new EnableFaceCulling());
  addDesiredStateChange(new SetFacesToCull(GL_FRONT));
}

Fixed version (ground truth):
@Override public void initialise(){
  super.initialise();
  playerCamera=worldRenderer.getActiveCamera();
  initSkysphere();
  addDesiredStateChange(new SetViewportToSizeOf(READ_ONLY_GBUFFER));
  addDesiredStateChange(new EnableMaterial("String_Node_Str"));
  addDesiredStateChange(new DisableDepthMask());
  addDesiredStateChange(new EnableFaceCulling());
  addDesiredStateChange(new SetFacesToCull(GL_FRONT));
}
Program: 571
Project: 571
Buggy source:
@ReceiveEvent(components=LocationComponent.class,netFilter=RegisterMode.AUTHORITY) public void onAttackRequest(AttackRequest event,EntityRef character){
  if (event.getItem().exists()) {
    if (!character.equals(event.getItem().getOwner())) {
      return;
    }
  }
  OnItemUseEvent onItemUseEvent=new OnItemUseEvent();
  event.getInstigator().send(onItemUseEvent);
  if (!onItemUseEvent.isConsumed()) {
    CharacterComponent characterComponent=character.getComponent(CharacterComponent.class);
    EntityRef gazeEntity=GazeAuthoritySystem.getGazeEntityForCharacter(character);
    LocationComponent gazeLocation=gazeEntity.getComponent(LocationComponent.class);
    Vector3f direction=gazeLocation.getWorldDirection();
    Vector3f originPos=gazeLocation.getWorldPosition();
    HitResult result=physics.rayTrace(originPos,direction,characterComponent.interactionRange,Sets.newHashSet(character),DEFAULTPHYSICSFILTER);
    if (result.isHit()) {
      result.getEntity().send(new AttackEvent(character,event.getItem()));
    }
  }
}

Fixed version (ground truth):
@ReceiveEvent(components=LocationComponent.class,netFilter=RegisterMode.AUTHORITY) public void onAttackRequest(AttackRequest event,EntityRef character,CharacterComponent characterComponent){
  if (event.getItem().exists()) {
    if (!character.equals(event.getItem().getOwner())) {
      return;
    }
  }
  OnItemUseEvent onItemUseEvent=new OnItemUseEvent();
  character.send(onItemUseEvent);
  if (!onItemUseEvent.isConsumed()) {
    EntityRef gazeEntity=GazeAuthoritySystem.getGazeEntityForCharacter(character);
    LocationComponent gazeLocation=gazeEntity.getComponent(LocationComponent.class);
    Vector3f direction=gazeLocation.getWorldDirection();
    Vector3f originPos=gazeLocation.getWorldPosition();
    HitResult result=physics.rayTrace(originPos,direction,characterComponent.interactionRange,Sets.newHashSet(character),DEFAULTPHYSICSFILTER);
    if (result.isHit()) {
      result.getEntity().send(new AttackEvent(character,event.getItem()));
    }
  }
}
Program: 572
Project: 572
Buggy source:
@ReceiveEvent(components={CharacterComponent.class}) public void onUseItemButton(UseItemButton event,EntityRef entity,CharacterHeldItemComponent characterHeldItemComponent){
  if (!event.isDown()) {
    return;
  }
  EntityRef selectedItemEntity=characterHeldItemComponent.selectedItem;
  if (!selectedItemEntity.exists()) {
    return;
  }
  OnItemUseEvent onItemUseEvent=new OnItemUseEvent();
  entity.send(onItemUseEvent);
  if (!onItemUseEvent.isConsumed()) {
    localPlayer.activateOwnedEntityAsClient(selectedItemEntity);
    entity.saveComponent(characterHeldItemComponent);
    event.consume();
  }
}

Fixed version (ground truth):
@ReceiveEvent(components={CharacterComponent.class}) public void onUseItemButton(UseItemButton event,EntityRef entity,CharacterHeldItemComponent characterHeldItemComponent){
  if (!event.isDown()) {
    return;
  }
  EntityRef selectedItemEntity=characterHeldItemComponent.selectedItem;
  if (!selectedItemEntity.exists()) {
    return;
  }
  boolean requestIsValid;
  if (networkSystem.getMode().isAuthority()) {
    requestIsValid=true;
  }
 else {
    OnItemUseEvent onItemUseEvent=new OnItemUseEvent();
    entity.send(onItemUseEvent);
    requestIsValid=!onItemUseEvent.isConsumed();
  }
  if (requestIsValid) {
    localPlayer.activateOwnedEntityAsClient(selectedItemEntity);
    entity.saveComponent(characterHeldItemComponent);
    event.consume();
  }
}
Program: 573
Project: 573
Buggy source:
@Override public void onDraw(Canvas canvas){
  updateItemListeners();
  canvas.setPart("String_Node_Str");
  boolean enabled=isEnabled();
  Border margin=canvas.getCurrentStyle().getMargin();
  int yOffset=0;
  for (int i=0; i < list.get().size(); ++i) {
    T item=list.get().get(i);
    Vector2i preferredSize=margin.grow(itemRenderer.getPreferredSize(item,canvas));
    Rect2i itemRegion=Rect2i.createFromMinAndSize(0,yOffset,canvas.size().x,preferredSize.y);
    ItemInteractionListener listener=itemListeners.get(i);
    if (enabled) {
      if (Objects.equals(item,selection.get())) {
        canvas.setMode(ACTIVE_MODE);
      }
 else       if (listener.isMouseOver()) {
        canvas.setMode(HOVER_MODE);
      }
 else {
        canvas.setMode(DEFAULT_MODE);
      }
      canvas.addInteractionRegion(listener,itemRenderer.getTooltip(item),itemRegion);
    }
 else {
      canvas.setMode(DISABLED_MODE);
    }
    canvas.drawBackground(itemRegion);
    itemRenderer.draw(item,canvas,margin.shrink(itemRegion));
    yOffset+=preferredSize.getY();
  }
}

Fixed version (ground truth):
@Override public void onDraw(Canvas canvas){
  updateItemListeners();
  canvas.setPart("String_Node_Str");
  boolean enabled=isEnabled();
  Border margin=canvas.getCurrentStyle().getMargin();
  int yOffset=0;
  for (int i=0; i < list.get().size(); ++i) {
    T item=list.get().get(i);
    Vector2i preferredSize=margin.grow(itemRenderer.getPreferredSize(item,canvas));
    Rect2i itemRegion=Rect2i.createFromMinAndSize(0,yOffset,canvas.size().x,preferredSize.y);
    ItemInteractionListener listener=itemListeners.get(i);
    if (enabled) {
      if (Objects.equals(item,selection.get())) {
        canvas.setMode(ACTIVE_MODE);
      }
 else       if (listener.isMouseOver()) {
        canvas.setMode(HOVER_MODE);
      }
 else {
        canvas.setMode(DEFAULT_MODE);
      }
      if (isInteractive()) {
        canvas.addInteractionRegion(listener,itemRenderer.getTooltip(item),itemRegion);
      }
    }
 else {
      canvas.setMode(DISABLED_MODE);
    }
    canvas.drawBackground(itemRegion);
    itemRenderer.draw(item,canvas,margin.shrink(itemRegion));
    yOffset+=preferredSize.getY();
  }
}
Program: 574
Project: 574
Buggy source:
public ItemIcon(){
  tooltip=new UIList<>();
  tooltip.setSelectable(false);
  final UISkin defaultSkin=Assets.getSkin("String_Node_Str").get();
  tooltip.setSkin(defaultSkin);
  tooltip.setItemRenderer(new TooltipLineRenderer(defaultSkin));
  tooltip.bindList(new DefaultBinding<>(new ArrayList<>()));
}

Fixed version (ground truth):
public ItemIcon(){
  tooltip=new UIList<>();
  tooltip.setInteractive(false);
  tooltip.setSelectable(false);
  final UISkin defaultSkin=Assets.getSkin("String_Node_Str").get();
  tooltip.setSkin(defaultSkin);
  tooltip.setItemRenderer(new TooltipLineRenderer(defaultSkin));
  tooltip.bindList(new DefaultBinding<>(new ArrayList<>()));
}
Program: 575
Project: 575
Buggy source:
public boolean isWindowedFullscreen(){
  return windowedFullscreen;
}

Fixed version (ground truth):
public boolean isWindowedFullscreen(){
  return displayModeSetting.getCurrent() == DisplayModeSetting.WINDOWED_FULLSCREEN;
}
Program: 576
Project: 576
Buggy source:
public void setFullscreen(boolean fullscreen){
  DisplayModeSetting oldValue=this.displayModeSetting;
  this.fullscreen=fullscreen;
  if (fullscreen) {
    this.displayModeSetting=DisplayModeSetting.FULLSCREEN;
  }
 else {
    if (windowedFullscreen) {
      this.displayModeSetting=DisplayModeSetting.WINDOWED_FULLSCREEN;
    }
 else {
      this.displayModeSetting=DisplayModeSetting.WINDOWED;
    }
  }
  propertyChangeSupport.firePropertyChange(DISPLAY_MODE_SETTING,oldValue,this.displayModeSetting);
}

Fixed version (ground truth):
public void setFullscreen(boolean fullscreen){
  DisplayModeSetting oldValue=displayModeSetting;
  if (fullscreen) {
    displayModeSetting=DisplayModeSetting.FULLSCREEN;
  }
 else {
    displayModeSetting=DisplayModeSetting.WINDOWED;
  }
  displayModeSetting.setCurrent(true);
  propertyChangeSupport.firePropertyChange(DISPLAY_MODE_SETTING,oldValue,displayModeSetting);
}
Program: 577
Project: 577
Buggy source:
public boolean isFullscreen(){
  return fullscreen;
}

Fixed version (ground truth):
public boolean isFullscreen(){
  return displayModeSetting.getCurrent() == DisplayModeSetting.FULLSCREEN;
}
Program: 578
Project: 578
Buggy source:
public DisplayModeSetting getDisplayModeSetting(){
  return this.displayModeSetting;
}

Fixed version (ground truth):
public DisplayModeSetting getDisplayModeSetting(){
  return displayModeSetting;
}
Program: 579
Project: 579
Buggy source:
public void setDisplayModeSetting(DisplayModeSetting displayModeSetting){
switch (displayModeSetting) {
case FULLSCREEN:
    this.windowedFullscreen=false;
  setFullscreen(true);
break;
case WINDOWED_FULLSCREEN:
this.windowedFullscreen=true;
setWindowedFullscreen(true);
break;
case WINDOWED:
this.windowedFullscreen=false;
setFullscreen(false);
break;
}
}

Fixed version (ground truth):
public void setDisplayModeSetting(DisplayModeSetting displayModeSetting){
switch (displayModeSetting) {
case FULLSCREEN:
    setFullscreen(true);
  break;
case WINDOWED_FULLSCREEN:
setWindowedFullscreen(true);
break;
case WINDOWED:
setFullscreen(false);
break;
}
}
Program: 580
Project: 580
Buggy source:
public void setWindowedFullscreen(boolean fullscreenWindowed){
  DisplayModeSetting oldValue=this.displayModeSetting;
  this.windowedFullscreen=fullscreenWindowed;
  if (fullscreenWindowed) {
    this.displayModeSetting=DisplayModeSetting.WINDOWED_FULLSCREEN;
    this.fullscreen=false;
  }
 else {
    setFullscreen(true);
  }
  propertyChangeSupport.firePropertyChange(DISPLAY_MODE_SETTING,oldValue,this.displayModeSetting);
}

Fixed version (ground truth):
public void setWindowedFullscreen(boolean fullscreenWindowed){
  DisplayModeSetting oldValue=displayModeSetting;
  if (fullscreenWindowed) {
    displayModeSetting=DisplayModeSetting.WINDOWED_FULLSCREEN;
    displayModeSetting.setCurrent(true);
    propertyChangeSupport.firePropertyChange(DISPLAY_MODE_SETTING,oldValue,displayModeSetting);
  }
 else {
    setFullscreen(true);
  }
}
Program: 582
Project: 582
Buggy source:
@Override public void onDraw(Canvas canvas){
  updateItemListeners();
  boolean enabled=isEnabled();
  Border margin=canvas.getCurrentStyle().getMargin();
  canvas.setPart("String_Node_Str");
  int yOffset=0;
  for (int i=0; i < list.get().size(); ++i) {
    T item=list.get().get(i);
    Vector2i preferredSize=margin.grow(itemRenderer.getPreferredSize(item,canvas));
    Rect2i itemRegion=Rect2i.createFromMinAndSize(0,yOffset,canvas.size().x,preferredSize.y);
    ItemInteractionListener listener=itemListeners.get(i);
    if (enabled) {
      if (Objects.equals(item,selection.get())) {
        canvas.setMode(ACTIVE_MODE);
      }
 else       if (listener.isMouseOver()) {
        canvas.setMode(HOVER_MODE);
      }
 else {
        canvas.setMode(DEFAULT_MODE);
      }
      canvas.addInteractionRegion(listener,itemRenderer.getTooltip(item),itemRegion);
    }
 else {
      canvas.setMode(DISABLED_MODE);
    }
    canvas.drawBackground(itemRegion);
    itemRenderer.draw(item,canvas,margin.shrink(itemRegion));
    yOffset+=preferredSize.getY();
  }
}

Fixed version (ground truth):
@Override public void onDraw(Canvas canvas){
  updateItemListeners();
  canvas.setPart("String_Node_Str");
  boolean enabled=isEnabled();
  Border margin=canvas.getCurrentStyle().getMargin();
  int yOffset=0;
  for (int i=0; i < list.get().size(); ++i) {
    T item=list.get().get(i);
    Vector2i preferredSize=margin.grow(itemRenderer.getPreferredSize(item,canvas));
    Rect2i itemRegion=Rect2i.createFromMinAndSize(0,yOffset,canvas.size().x,preferredSize.y);
    ItemInteractionListener listener=itemListeners.get(i);
    if (enabled) {
      if (Objects.equals(item,selection.get())) {
        canvas.setMode(ACTIVE_MODE);
      }
 else       if (listener.isMouseOver()) {
        canvas.setMode(HOVER_MODE);
      }
 else {
        canvas.setMode(DEFAULT_MODE);
      }
      canvas.addInteractionRegion(listener,itemRenderer.getTooltip(item),itemRegion);
    }
 else {
      canvas.setMode(DISABLED_MODE);
    }
    canvas.drawBackground(itemRegion);
    itemRenderer.draw(item,canvas,margin.shrink(itemRegion));
    yOffset+=preferredSize.getY();
  }
}
Program: 583
Project: 583
Buggy source:
public void initOpenGLParams(){
  glEnable(GL_CULL_FACE);
  glEnable(GL_DEPTH_TEST);
  glEnable(GL_NORMALIZE);
  glDepthFunc(GL_LEQUAL);
}

Fixed version (ground truth):
public static void initOpenGLParams(){
  glEnable(GL_CULL_FACE);
  glEnable(GL_DEPTH_TEST);
  glEnable(GL_NORMALIZE);
  glDepthFunc(GL_LEQUAL);
}
Program: 584
Project: 584
Buggy source:
@Override public void process(){
  PerformanceMonitor.startActivity("String_Node_Str");
  initialClearing();
  READ_ONLY_GBUFFER.bind();
  READ_ONLY_GBUFFER.setRenderBufferMask(true,true,true);
  playerCamera.lookThroughNormalized();
  READ_ONLY_GBUFFER.setRenderBufferMask(true,false,false);
  backdropRenderer.render(playerCamera);
  PerformanceMonitor.endActivity();
}

Fixed version (ground truth):
@Override public void process(){
  PerformanceMonitor.startActivity("String_Node_Str");
  READ_ONLY_GBUFFER.bind();
  playerCamera.lookThroughNormalized();
  READ_ONLY_GBUFFER.setRenderBufferMask(true,false,false);
  glCallList(skySphere);
  READ_ONLY_GBUFFER.setRenderBufferMask(true,true,true);
  playerCamera.lookThrough();
  PerformanceMonitor.endActivity();
}
Program: 585
Project: 585
Buggy source:
@Override public void initialise(){
  super.initialise();
  playerCamera=worldRenderer.getActiveCamera();
  requiresFBO(new FBOConfig(REFRACTIVE_REFLECTIVE,FULL_SCALE,FBO.Type.HDR).useNormalBuffer(),displayResolutionDependentFBOs);
}

Fixed version (ground truth):
@Override public void initialise(){
  super.initialise();
  playerCamera=worldRenderer.getActiveCamera();
  initSkysphere();
  addDesiredStateChange(new EnableMaterial("String_Node_Str"));
  addDesiredStateChange(new DisableDepthMask());
  addDesiredStateChange(new EnableFaceCulling());
  addDesiredStateChange(new SetFacesToCull(GL_FRONT));
}
Program: 586
Project: 586
Buggy source:
@Override public void execute(){
  glUseProgram(0);
}

Fixed version (ground truth):
@Override public void execute(){
  shaderManager.disableShader();
}