nus-yam/ex-repair huggingface dataset:
Program: 10335
Project: 10335
Buggy source:
/** 
 * Checks if a chunk is within the saveRadius  (and chunk caching is disabled).
 */
public static boolean canSaveChunk(Chunk chunk){
  if (isChunkOverridden(chunk)) {
    return true;
  }
  if (!canDownloadInGeneral()) {
    return false;
  }
  if (receivedPackets.contains(1)) {
    if (!canCacheChunks && saveRadius >= 0) {
      int distanceX=chunk.xPosition - WDL.thePlayer.chunkCoordX;
      int distanceZ=chunk.zPosition - WDL.thePlayer.chunkCoordZ;
      if (Math.abs(distanceX) > saveRadius || Math.abs(distanceZ) > saveRadius) {
        return false;
      }
    }
    return true;
  }
 else {
    return canUseFunctionsUnknownToServer();
  }
}

Fixed version (ground truth):
/** 
 * Checks if a chunk is within the saveRadius  (and chunk caching is disabled).
 */
public static boolean canSaveChunk(Chunk chunk){
  if (isChunkOverridden(chunk)) {
    return true;
  }
  if (!canDownloadInGeneral()) {
    return false;
  }
  if (receivedPackets.contains(1)) {
    if (!canCacheChunks && saveRadius >= 0) {
      int distanceX=chunk.x - WDL.thePlayer.chunkCoordX;
      int distanceZ=chunk.z - WDL.thePlayer.chunkCoordZ;
      if (Math.abs(distanceX) > saveRadius || Math.abs(distanceZ) > saveRadius) {
        return false;
      }
    }
    return true;
  }
 else {
    return canUseFunctionsUnknownToServer();
  }
}
Program: 10336
Project: 10336
Buggy source:
@Override public void drawEntry(int slotIndex,int x,int y,int listWidth,int slotHeight,int mouseX,int mouseY,boolean isSelected){
  button.xPosition=GuiWDL.this.width / 2 - 100;
  button.yPosition=y;
  button.drawButton(mc,mouseX,mouseY);
  if (button.isMouseOver()) {
    displayedTooltip=tooltip;
  }
}

Fixed version (ground truth):
@Override public void drawEntry(int slotIndex,int x,int y,int listWidth,int slotHeight,int mouseX,int mouseY,boolean isSelected){
  button.x=GuiWDL.this.width / 2 - 100;
  button.y=y;
  button.drawButton(mc,mouseX,mouseY);
  if (button.isMouseOver()) {
    displayedTooltip=tooltip;
  }
}
Program: 10337
Project: 10337
Buggy source:
/** 
 * Draws the screen and all the components in it.
 */
@Override public void drawScreen(int mouseX,int mouseY,float partialTicks){
  this.drawDefaultBackground();
  displayedTooltip=null;
  this.list.drawScreen(mouseX,mouseY,partialTicks);
  this.drawCenteredString(this.fontRenderer,this.title,this.width / 2,8,0xFFFFFF);
  String name=I18n.format("String_Node_Str");
  this.drawString(this.fontRenderer,name,this.worldname.xPosition - this.fontRenderer.getStringWidth(name + "String_Node_Str"),26,0xFFFFFF);
  this.worldname.drawTextBox();
  super.drawScreen(mouseX,mouseY,partialTicks);
  Utils.drawGuiInfoBox(displayedTooltip,width,height,48);
}

Fixed version (ground truth):
/** 
 * Draws the screen and all the components in it.
 */
@Override public void drawScreen(int mouseX,int mouseY,float partialTicks){
  this.drawDefaultBackground();
  displayedTooltip=null;
  this.list.drawScreen(mouseX,mouseY,partialTicks);
  this.drawCenteredString(this.fontRenderer,this.title,this.width / 2,8,0xFFFFFF);
  String name=I18n.format("String_Node_Str");
  this.drawString(this.fontRenderer,name,this.worldname.x - this.fontRenderer.getStringWidth(name + "String_Node_Str"),26,0xFFFFFF);
  this.worldname.drawTextBox();
  super.drawScreen(mouseX,mouseY,partialTicks);
  Utils.drawGuiInfoBox(displayedTooltip,width,height,48);
}
Program: 10338
Project: 10338
Buggy source:
@Override public void drawButton(Minecraft mc,int mouseX,int mouseY){
  if (GuiWDLChunkOverrides.this.mode == this.mode) {
    drawRect(this.xPosition - 2,this.yPosition - 2,this.xPosition + width + 2,this.yPosition + height + 2,0xFF007F00);
  }
  super.drawButton(mc,mouseX,mouseY);
  GlStateManager.color(1.0f,1.0f,1.0f);
  mc.getTextureManager().bindTexture(WIDGET_TEXTURES);
  this.drawTexturedModalRect(this.xPosition + 2,this.yPosition + 2,mode.overlayU,mode.overlayV,16,16);
}

Fixed version (ground truth):
@Override public void drawButton(Minecraft mc,int mouseX,int mouseY){
  if (GuiWDLChunkOverrides.this.mode == this.mode) {
    drawRect(this.x - 2,this.y - 2,this.x + width + 2,this.y + height + 2,0xFF007F00);
  }
  super.drawButton(mc,mouseX,mouseY);
  GlStateManager.color(1.0f,1.0f,1.0f);
  mc.getTextureManager().bindTexture(WIDGET_TEXTURES);
  this.drawTexturedModalRect(this.x + 2,this.y + 2,mode.overlayU,mode.overlayV,16,16);
}
Program: 10339
Project: 10339
Buggy source:
@Override public void drawEntry(int slotIndex,int x,int y,int listWidth,int slotHeight,int mouseX,int mouseY,boolean isSelected){
  int center=(GuiWDLEntities.this.width / 2) - (totalWidth / 2) + largestWidth + 10;
  mc.fontRenderer.drawString(this.displayEntity,center - largestWidth - 10,y + slotHeight / 2 - mc.fontRenderer.FONT_HEIGHT / 2,0xFFFFFF);
  this.onOffButton.xPosition=center;
  this.onOffButton.yPosition=y;
  this.onOffButton.enabled=category.isGroupEnabled();
  this.onOffButton.displayString=getButtonText();
  this.rangeSlider.xPosition=center + 85;
  this.rangeSlider.yPosition=y;
  if (!this.cachedMode.equals(mode)) {
    cachedMode=mode;
    rangeSlider.enabled=(cachedMode.equals("String_Node_Str"));
    rangeSlider.setValue(EntityUtils.getEntityTrackDistance(entity));
  }
  this.onOffButton.drawButton(mc,mouseX,mouseY);
  this.rangeSlider.drawButton(mc,mouseX,mouseY);
}

Fixed version (ground truth):
@Override public void drawEntry(int slotIndex,int x,int y,int listWidth,int slotHeight,int mouseX,int mouseY,boolean isSelected){
  int center=(GuiWDLEntities.this.width / 2) - (totalWidth / 2) + largestWidth + 10;
  mc.fontRenderer.drawString(this.displayEntity,center - largestWidth - 10,y + slotHeight / 2 - mc.fontRenderer.FONT_HEIGHT / 2,0xFFFFFF);
  this.onOffButton.x=center;
  this.onOffButton.y=y;
  this.onOffButton.enabled=category.isGroupEnabled();
  this.onOffButton.displayString=getButtonText();
  this.rangeSlider.x=center + 85;
  this.rangeSlider.y=y;
  if (!this.cachedMode.equals(mode)) {
    cachedMode=mode;
    rangeSlider.enabled=(cachedMode.equals("String_Node_Str"));
    rangeSlider.setValue(EntityUtils.getEntityTrackDistance(entity));
  }
  this.onOffButton.drawButton(mc,mouseX,mouseY);
  this.rangeSlider.drawButton(mc,mouseX,mouseY);
}
Program: 10340
Project: 10340
Buggy source:
@Override public void drawEntry(int slotIndex,int x,int y,int listWidth,int slotHeight,int mouseX,int mouseY,boolean isSelected){
  if (button != null) {
    button.xPosition=GuiWDLExtensions.this.width - 180;
    button.yPosition=y - 1;
    button.drawButton(mc,mouseX,mouseY);
  }
  disableButton.xPosition=GuiWDLExtensions.this.width - 92;
  disableButton.yPosition=y - 1;
  disableButton.drawButton(mc,mouseX,mouseY);
  int centerY=y + slotHeight / 2 - fontRenderer.FONT_HEIGHT / 2;
  fontRenderer.drawString(label,x,centerY,0xFFFFFF);
}

Fixed version (ground truth):
@Override public void drawEntry(int slotIndex,int x,int y,int listWidth,int slotHeight,int mouseX,int mouseY,boolean isSelected){
  if (button != null) {
    button.x=GuiWDLExtensions.this.width - 180;
    button.y=y - 1;
    button.drawButton(mc,mouseX,mouseY);
  }
  disableButton.x=GuiWDLExtensions.this.width - 92;
  disableButton.y=y - 1;
  disableButton.drawButton(mc,mouseX,mouseY);
  int centerY=y + slotHeight / 2 - fontRenderer.FONT_HEIGHT / 2;
  fontRenderer.drawString(label,x,centerY,0xFFFFFF);
}
Program: 10341
Project: 10341
Buggy source:
@Override public final void drawEntry(int slotIndex,int x,int y,int listWidth,int slotHeight,int mouseX,int mouseY,boolean isSelected){
  drawString(fontRenderer,this.ruleName,x,y + 6,0xFFFFFFFF);
  this.resetButton.xPosition=x + listWidth / 2 + 110;
  this.resetButton.yPosition=y;
  this.resetButton.enabled=isRuleSet(this.ruleName);
  this.resetButton.drawButton(mc,mouseX,mouseY);
  this.draw(x,y,listWidth,slotHeight,mouseX,mouseY);
  if (this.isMouseOverControl(mouseX,mouseY)) {
    String key="String_Node_Str" + ruleName;
    if (I18n.hasKey(key)) {
      hoveredToolTip=I18n.format(key);
    }
  }
}

Fixed version (ground truth):
@Override public final void drawEntry(int slotIndex,int x,int y,int listWidth,int slotHeight,int mouseX,int mouseY,boolean isSelected){
  drawString(fontRenderer,this.ruleName,x,y + 6,0xFFFFFFFF);
  this.resetButton.x=x + listWidth / 2 + 110;
  this.resetButton.y=y;
  this.resetButton.enabled=isRuleSet(this.ruleName);
  this.resetButton.drawButton(mc,mouseX,mouseY);
  this.draw(x,y,listWidth,slotHeight,mouseX,mouseY);
  if (this.isMouseOverControl(mouseX,mouseY)) {
    String key="String_Node_Str" + ruleName;
    if (I18n.hasKey(key)) {
      hoveredToolTip=I18n.format(key);
    }
  }
}
Program: 10342
Project: 10342
Buggy source:
@Override public void draw(int x,int y,int listWidth,int slotHeight,int mouseX,int mouseY){
  if (!this.isFocused()) {
    field.setFocused(false);
  }
  field.xPosition=x + listWidth / 2;
  field.yPosition=y;
  field.drawTextBox();
}

Fixed version (ground truth):
@Override public void draw(int x,int y,int listWidth,int slotHeight,int mouseX,int mouseY){
  if (!this.isFocused()) {
    field.setFocused(false);
  }
  field.x=x + listWidth / 2;
  field.y=y;
  field.drawTextBox();
}
Program: 10343
Project: 10343
Buggy source:
@Override public void drawEntry(int slotIndex,int x,int y,int listWidth,int slotHeight,int mouseX,int mouseY,boolean isSelected){
  button.xPosition=GuiWDLMessages.this.width / 2 - 100;
  button.yPosition=y;
  button.displayString=I18n.format("String_Node_Str" + WDLMessages.isEnabled(type),type.getDisplayName());
  button.enabled=WDLMessages.enableAllMessages && WDLMessages.isGroupEnabled(category);
  button.drawButton(mc,mouseX,mouseY);
  if (button.isMouseOver()) {
    hoveredButtonDescription=type.getDescription();
  }
}

Fixed version (ground truth):
@Override public void drawEntry(int slotIndex,int x,int y,int listWidth,int slotHeight,int mouseX,int mouseY,boolean isSelected){
  button.x=GuiWDLMessages.this.width / 2 - 100;
  button.y=y;
  button.displayString=I18n.format("String_Node_Str" + WDLMessages.isEnabled(type),type.getDisplayName());
  button.enabled=WDLMessages.enableAllMessages && WDLMessages.isGroupEnabled(category);
  button.drawButton(mc,mouseX,mouseY);
  if (button.isMouseOver()) {
    hoveredButtonDescription=type.getDescription();
  }
}
Program: 10344
Project: 10344
Buggy source:
/** 
 * Returns true if the given world has skylight data.
 * @return a boolean
 */
public static boolean hasSkyLight(World world){
  return world.provider.hasSkylight();
}

Fixed version (ground truth):
/** 
 * Returns true if the given world has skylight data.
 * @return a boolean
 */
public static boolean hasSkyLight(World world){
  return world.provider.hasSkyLight();
}
Program: 10346
Project: 10346
Buggy source:
@Override public Object next(){
  byte[] key=cursor.get_key(false);
  logger.info("String_Node_Str",new String(key));
  if (key == null) {
    return null;
  }
  byte[] value=cursor.get_value(true);
  logger.info("String_Node_Str",new String(value));
  KeyValue keyValue=new KeyValue();
  keyValue.key=key;
  keyValue.value=value;
  threadByteBuffer.get().clear();
  kryo.writeObject(threadByteBuffer.get(),keyValue);
  return threadByteBuffer.get().toBytes();
}

Fixed version (ground truth):
@Override public Object next(){
  byte[] key=cursor.get_key(false);
  if (key == null) {
    return null;
  }
  byte[] value=cursor.get_value(true);
  KeyValue keyValue=new KeyValue();
  keyValue.key=key;
  keyValue.value=value;
  threadByteBuffer.get().clear();
  kryo.writeObject(threadByteBuffer.get(),keyValue);
  return threadByteBuffer.get().toBytes();
}
Program: 10347
Project: 10347
Buggy source:
@Override public Object next(){
  if (cursor.step()) {
    byte[] key=cursor.get_key(false);
    byte[] value=cursor.get_value(false);
    KeyValue keyValue=new KeyValue();
    keyValue.key=key;
    keyValue.value=value;
    threadByteBuffer.get().clear();
    kryo.writeObject(threadByteBuffer.get(),keyValue);
    return threadByteBuffer.get().toBytes();
  }
  return null;
}

Fixed version (ground truth):
@Override public Object next(){
  byte[] key=cursor.get_key(false);
  byte[] value=cursor.get_value(false);
  KeyValue keyValue=new KeyValue();
  keyValue.key=key;
  keyValue.value=value;
  threadByteBuffer.get().clear();
  kryo.writeObject(threadByteBuffer.get(),keyValue);
  cursor.step();
  return threadByteBuffer.get().toBytes();
}
Program: 10348
Project: 10348
Buggy source:
public static void main(String[] args){
  PistachiosClient client=null;
  try {
    client=new PistachiosClient();
  }
 catch (  Exception e) {
    logger.info("String_Node_Str",e);
    if (client != null)     client.close();
    return;
  }
  try {
    String id="String_Node_Str";
    boolean store=false;
    String value="String_Node_Str";
    if (args.length == 2 && args[0].equals("String_Node_Str")) {
      id=args[1];
      System.out.println("String_Node_Str" + id + "String_Node_Str"+ new String(client.lookup(id.getBytes())));
    }
 else     if (args.length == 3 && args[0].equals("String_Node_Str")) {
      id=args[1];
      store=true;
      value=args[2];
      client.store(id.getBytes(),value.getBytes());
    }
 else     if (args.length == 3 && args[0].equals("String_Node_Str")) {
      id=(args[1]);
      store=true;
      value=args[2];
      List list=new java.util.ArrayList();
      list.add(value.getBytes());
      client.processBatch(id.getBytes(),list);
    }
 else     if (args.length == 2 && args[0].equals("String_Node_Str")) {
      System.out.println("String_Node_Str" + id);
      try {
        id=args[1];
      }
 catch (      Exception e) {
      }
      client.delete(id.getBytes());
    }
 else {
      System.out.println("String_Node_Str");
      System.exit(0);
    }
  }
 catch (  Exception e) {
    System.out.println("String_Node_Str" + e);
  }
 finally {
    client.close();
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  PistachiosClient client=null;
  try {
    client=new PistachiosClient();
  }
 catch (  Exception e) {
    logger.info("String_Node_Str",e);
    if (client != null)     client.close();
    return;
  }
  try {
    String id="String_Node_Str";
    boolean store=false;
    String value="String_Node_Str";
    if (args.length == 2 && args[0].equals("String_Node_Str")) {
      id=args[1];
      System.out.println("String_Node_Str" + id + "String_Node_Str"+ new String(client.lookup(id.getBytes())));
    }
 else     if (args.length == 3 && args[0].equals("String_Node_Str")) {
      id=args[1];
      store=true;
      value=args[2];
      client.store(id.getBytes(),value.getBytes());
    }
 else     if (args.length == 3 && args[0].equals("String_Node_Str")) {
      id=(args[1]);
      store=true;
      value=args[2];
      List list=new java.util.ArrayList();
      list.add(value.getBytes());
      client.processBatch(id.getBytes(),list);
    }
 else     if (args.length == 2 && args[0].equals("String_Node_Str")) {
      System.out.println("String_Node_Str" + id);
      try {
        id=args[1];
      }
 catch (      Exception e) {
      }
      client.delete(id.getBytes());
    }
 else     if (args.length == 2 && args[0].equals("String_Node_Str")) {
      String partition=args[1];
      client.iterator(Long.parseLong(partition));
      System.out.println("String_Node_Str" + id);
    }
 else {
      System.out.println("String_Node_Str");
      System.exit(0);
    }
  }
 catch (  Exception e) {
    System.out.println("String_Node_Str" + e);
  }
 finally {
    client.close();
  }
}
Program: 10349
Project: 10349
Buggy source:
public void jump(byte[] key,long itId){
  PistachiosTkIterator pit=PistachiosTkIterator.getPistachiosTkIterator(itId);
  if (!pit.isCursorSet()) {
synchronized (pit) {
      if (!pit.isCursorSet()) {
        pit.setCursor(hDb.cursor());
      }
    }
  }
  pit.jump(key);
}

Fixed version (ground truth):
public void jump(byte[] key,long itId){
  PistachiosTkIterator pit=PistachiosTkIterator.getPistachiosTkIterator(itId);
  if (!pit.isCursorSet()) {
synchronized (pit) {
      if (!pit.isCursorSet()) {
        pit.setCursor(hDb.cursor());
      }
    }
  }
  pit.jump(key);
  pit.next();
}
Program: 10351
Project: 10351
Buggy source:
public boolean init(){
  boolean initialized=false;
  logger.info("String_Node_Str");
  logger.info("String_Node_Str",doNothing);
  try {
    Configuration conf=ConfigurationManager.getConfiguration();
    ZKHelixAdmin admin=new ZKHelixAdmin(conf.getString(ZOOKEEPER_SERVER));
    IdealState idealState=admin.getResourceIdealState("String_Node_Str","String_Node_Str");
    long totalParition=(long)idealState.getNumPartitions();
    profileStore=new LocalStorageEngine(conf.getString(PROFILE_BASE_DIR),(int)totalParition,8,conf.getInt("String_Node_Str"),conf.getLong("String_Node_Str"));
    ProcessorRegistry.getInstance().init();
    logger.info("String_Node_Str",conf.getString(ZOOKEEPER_SERVER,"String_Node_Str"),"String_Node_Str",conf.getString(PROFILE_HELIX_INSTANCE_ID,"String_Node_Str"));
    helixPartitionSpectator=HelixPartitionSpectator.getInstance(conf.getString(ZOOKEEPER_SERVER),"String_Node_Str",InetAddress.getLocalHost().getHostName());
    manager=new HelixPartitionManager<>(conf.getString(ZOOKEEPER_SERVER),"String_Node_Str",InetAddress.getLocalHost().getHostName());
    manager.start("String_Node_Str",new BootstrapOnlineOfflineStateModelFactory(new StorePartitionHandlerFactory()));
    initialized=true;
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e);
  }
  logger.info("String_Node_Str");
  return initialized;
}

Fixed version (ground truth):
public boolean init(){
  boolean initialized=false;
  logger.info("String_Node_Str");
  logger.info("String_Node_Str",doNothing);
  try {
    Configuration conf=ConfigurationManager.getConfiguration();
    ZKHelixAdmin admin=new ZKHelixAdmin(conf.getString(ZOOKEEPER_SERVER));
    IdealState idealState=admin.getResourceIdealState("String_Node_Str","String_Node_Str");
    long totalParition=(long)idealState.getNumPartitions();
    profileStore=new LocalStorageEngine(conf.getString(PROFILE_BASE_DIR),(int)totalParition,8,conf.getInt("String_Node_Str"),conf.getLong("String_Node_Str"));
    ProcessorRegistry.getInstance().init();
    logger.info("String_Node_Str",conf.getString(ZOOKEEPER_SERVER,"String_Node_Str"),"String_Node_Str",conf.getString(PROFILE_HELIX_INSTANCE_ID,"String_Node_Str"));
    helixPartitionSpectator=HelixPartitionSpectator.getInstance(conf.getString(ZOOKEEPER_SERVER),"String_Node_Str",NativeUtils.getHostname());
    manager=new HelixPartitionManager<>(conf.getString(ZOOKEEPER_SERVER),"String_Node_Str",NativeUtils.getHostname());
    manager.start("String_Node_Str",new BootstrapOnlineOfflineStateModelFactory(new StorePartitionHandlerFactory()));
    initialized=true;
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e);
  }
  logger.info("String_Node_Str");
  return initialized;
}
Program: 10352
Project: 10352
Buggy source:
public static void main(String[] args){
  try {
    reporter.start();
    Configuration conf=ConfigurationManager.getConfiguration();
    logger.info("String_Node_Str",conf.getString(ZOOKEEPER_SERVER));
    helixManager=HelixManagerFactory.getZKHelixManager("String_Node_Str",InetAddress.getLocalHost().getHostName(),InstanceType.CONTROLLER,conf.getString(ZOOKEEPER_SERVER));
    helixManager.connect();
    controller=new GenericHelixController();
    helixManager.addConfigChangeListener(controller);
    helixManager.addLiveInstanceChangeListener(controller);
    helixManager.addIdealStateChangeListener(controller);
    helixManager.addExternalViewChangeListener(controller);
    helixManager.addControllerListener(controller);
    instance=new PistachiosServer();
    instance.init();
    handler=new DefaultPistachiosHandler();
    Runnable simple=new Runnable(){
      public void run(){
        NettyPistachioServer.startServer(handler);
      }
    }
;
    new Thread(simple).start();
  }
 catch (  Exception x) {
    x.printStackTrace();
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  try {
    reporter.start();
    Configuration conf=ConfigurationManager.getConfiguration();
    logger.info("String_Node_Str",conf.getString(ZOOKEEPER_SERVER));
    helixManager=HelixManagerFactory.getZKHelixManager("String_Node_Str",NativeUtils.getHostname(),InstanceType.CONTROLLER,conf.getString(ZOOKEEPER_SERVER));
    helixManager.connect();
    controller=new GenericHelixController();
    helixManager.addConfigChangeListener(controller);
    helixManager.addLiveInstanceChangeListener(controller);
    helixManager.addIdealStateChangeListener(controller);
    helixManager.addExternalViewChangeListener(controller);
    helixManager.addControllerListener(controller);
    instance=new PistachiosServer();
    instance.init();
    handler=new DefaultPistachiosHandler();
    Runnable simple=new Runnable(){
      public void run(){
        NettyPistachioServer.startServer(handler);
      }
    }
;
    new Thread(simple).start();
  }
 catch (  Exception x) {
    x.printStackTrace();
  }
}
Program: 10353
Project: 10353
Buggy source:
public NettyPistachioClient() throws Exception {
  localHostAddress=InetAddress.getLocalHost().getHostAddress();
  if (helixPartitionSpectator == null) {
synchronized (this) {
      if (helixPartitionSpectator == null) {
        try {
          helixPartitionSpectator=HelixPartitionSpectator.getInstance(conf.getString(ZOOKEEPER_SERVER),"String_Node_Str",InetAddress.getLocalHost().getHostName());
        }
 catch (        Exception e) {
          logger.error("String_Node_Str",e);
          throw e;
        }
      }
    }
  }
}

Fixed version (ground truth):
public NettyPistachioClient() throws Exception {
  localHostAddress=InetAddress.getLocalHost().getHostAddress();
  if (helixPartitionSpectator == null) {
synchronized (this) {
      if (helixPartitionSpectator == null) {
        try {
          helixPartitionSpectator=HelixPartitionSpectator.getInstance(conf.getString(ZOOKEEPER_SERVER),"String_Node_Str",NativeUtils.getHostname());
        }
 catch (        Exception e) {
          logger.error("String_Node_Str",e);
          throw e;
        }
      }
    }
  }
}
Program: 10355
Project: 10355
Buggy source:
public static void main(String[] args){
  PistachiosClient client;
  try {
    client=new PistachiosClient();
  }
 catch (  Exception e) {
    logger.info("String_Node_Str",e);
    return;
  }
  Random rand=new Random();
  while (true) {
    try {
      long id=rand.nextLong();
      String value=InetAddress.getLocalHost().getHostName() + rand.nextInt();
      client.store(com.google.common.primitives.Longs.toByteArray(id),value.getBytes());
      for (int i=0; i < 30; i++) {
        byte[] clientValue=client.lookup(com.google.common.primitives.Longs.toByteArray(id),true);
        String remoteValue=new String(clientValue);
        if (Arrays.equals(value.getBytes(),clientValue) || !remoteValue.contains(InetAddress.getLocalHost().getHostName())) {
          logger.debug("String_Node_Str",id,value);
        }
 else {
          logger.error("String_Node_Str",id,value,new String(clientValue));
          System.exit(0);
        }
        Thread.sleep(100);
      }
    }
 catch (    Exception e) {
      System.out.println("String_Node_Str" + e);
      System.exit(0);
    }
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  PistachiosClient client;
  try {
    client=new PistachiosClient();
  }
 catch (  Exception e) {
    logger.info("String_Node_Str",e);
    return;
  }
  Random rand=new Random();
  while (true) {
    try {
      long id=rand.nextLong();
      String value=NativeUtils.getHostname() + rand.nextInt();
      client.store(com.google.common.primitives.Longs.toByteArray(id),value.getBytes());
      for (int i=0; i < 30; i++) {
        byte[] clientValue=client.lookup(com.google.common.primitives.Longs.toByteArray(id),true);
        String remoteValue=new String(clientValue);
        if (Arrays.equals(value.getBytes(),clientValue) || !remoteValue.contains(NativeUtils.getHostname())) {
          logger.debug("String_Node_Str",id,value);
        }
 else {
          logger.error("String_Node_Str",id,value,new String(clientValue));
          System.exit(0);
        }
        Thread.sleep(100);
      }
    }
 catch (    Exception e) {
      System.out.println("String_Node_Str" + e);
      System.exit(0);
    }
  }
}
Program: 10356
Project: 10356
Buggy source:
public static void main(String[] args){
  PistachiosClient client=null;
  try {
    client=new PistachiosClient();
  }
 catch (  Exception e) {
    logger.info("String_Node_Str",e);
    if (client != null)     client.close();
    return;
  }
  try {
    String id="String_Node_Str";
    boolean store=false;
    String value="String_Node_Str";
    if (args.length == 2 && args[0].equals("String_Node_Str")) {
      id=args[1];
      System.out.println("String_Node_Str" + id + "String_Node_Str"+ new String(client.lookup(id.getBytes())));
    }
 else     if (args.length == 3 && args[0].equals("String_Node_Str")) {
      id=args[1];
      store=true;
      value=args[2];
      client.store(id.getBytes(),value.getBytes());
    }
 else     if (args.length == 3 && args[0].equals("String_Node_Str")) {
      id=(args[1]);
      store=true;
      value=args[2];
      List list=new java.util.ArrayList();
      list.add(value.getBytes());
      client.processBatch(id.getBytes(),list);
    }
 else {
      System.out.println("String_Node_Str");
      System.exit(0);
    }
  }
 catch (  Exception e) {
    System.out.println("String_Node_Str" + e);
  }
 finally {
    client.close();
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  PistachiosClient client=null;
  try {
    client=new PistachiosClient();
  }
 catch (  Exception e) {
    logger.info("String_Node_Str",e);
    if (client != null)     client.close();
    return;
  }
  try {
    String id="String_Node_Str";
    boolean store=false;
    String value="String_Node_Str";
    if (args.length == 2 && args[0].equals("String_Node_Str")) {
      id=args[1];
      System.out.println("String_Node_Str" + id + "String_Node_Str"+ new String(client.lookup(id.getBytes())));
    }
 else     if (args.length == 3 && args[0].equals("String_Node_Str")) {
      id=args[1];
      store=true;
      value=args[2];
      client.store(id.getBytes(),value.getBytes(),true);
    }
 else     if (args.length == 3 && args[0].equals("String_Node_Str")) {
      id=(args[1]);
      store=true;
      value=args[2];
      List list=new java.util.ArrayList();
      list.add(value.getBytes());
      client.processBatch(id.getBytes(),list);
    }
 else {
      System.out.println("String_Node_Str");
      System.exit(0);
    }
  }
 catch (  Exception e) {
    System.out.println("String_Node_Str" + e);
  }
 finally {
    client.close();
  }
}
Program: 10357
Project: 10357
Buggy source:
private static void setZkRegistryData(String jarPath,String className,String zkPath,ZooKeeper zk){
  try {
    if (jarPath != null && className != null) {
      zk.create(zkPath,(jarPath + "String_Node_Str" + className).getBytes(),null,org.apache.zookeeper.CreateMode.PERSISTENT);
      zk.setData(zkPath,(jarPath + "String_Node_Str" + className).getBytes(),-1);
    }
  }
 catch (  Exception e) {
  }
}

Fixed version (ground truth):
private static void setZkRegistryData(String jarPath,String className,String zkPath,ZooKeeper zk){
  try {
    if (jarPath != null && className != null) {
      String value=(jarPath + "String_Node_Str" + className);
      logger.info("String_Node_Str",zkPath,value);
      String currentPath="String_Node_Str";
      for (      String path : zkPath.split("String_Node_Str")) {
        if (path.isEmpty())         continue;
        currentPath=currentPath + "String_Node_Str" + path;
        try {
          logger.info("String_Node_Str",currentPath);
          zk.create(currentPath,value.getBytes(),org.apache.zookeeper.ZooDefs.Ids.OPEN_ACL_UNSAFE,org.apache.zookeeper.CreateMode.PERSISTENT);
        }
 catch (        NodeExistsException e0) {
        }
catch (        Exception e) {
          logger.info("String_Node_Str",path,e);
          break;
        }
      }
      zk.setData(zkPath,value.getBytes(),-1);
      logger.info("String_Node_Str",zkPath,value);
    }
  }
 catch (  Exception e) {
    logger.info("String_Node_Str",e);
  }
}
Program: 10359
Project: 10359
Buggy source:
public void init(){
  try {
    logger.info("String_Node_Str");
    client=CuratorFrameworkFactory.newClient(ConfigurationManager.getConfiguration().getString(ZOOKEEPER_SERVER),new ExponentialBackoffRetry(1000,3));
    client.start();
    cache=new NodeCache(client,PATH);
    cache.start();
    cache.getListenable().addListener(this);
    nodeChanged();
  }
 catch (  Exception e) {
    logger.info("String_Node_Str",e);
  }
}

Fixed version (ground truth):
public void init(){
  try {
    logger.info("String_Node_Str");
    client=CuratorFrameworkFactory.newClient(ConfigurationManager.getConfiguration().getString(ZOOKEEPER_SERVER),new ExponentialBackoffRetry(1000,3));
    client.start();
    cache=new NodeCache(client,getZKPath());
    cache.start();
    cache.getListenable().addListener(this);
    nodeChanged();
  }
 catch (  Exception e) {
    logger.info("String_Node_Str",e);
  }
}
Program: 10360
Project: 10360
Buggy source:
public static synchronized StoreCallbackRegistry getInstance(){
  if (instance == null) {
    instance=new StoreCallbackRegistry();
    instance.processor=new DefaultStoreCallback();
  }
  return instance;
}

Fixed version (ground truth):
public static synchronized StoreCallbackRegistry getInstance(){
  if (instance == null) {
    instance=new StoreCallbackRegistry();
    instance.init();
    if (instance.processor == null)     instance.processor=new DefaultStoreCallback();
  }
  return instance;
}
Program: 10361
Project: 10361
Buggy source:
public LocalStorageEngine(String baseDir,int numStores,int recordSizeAlignment,int totalRecords,long mappedMemorySize,boolean isReadOnly){
  this.baseDir=baseDir;
  this.recordSizeAlignment=recordSizeAlignment;
  this.totalRecords=totalRecords;
  this.mappedMemorySize=mappedMemorySize;
  this.isReadOnly=isReadOnly;
  this.numStores=numStores;
}

Fixed version (ground truth):
public LocalStorageEngine(String baseDir,int numStores,int recordSizeAlignment,int totalRecords,long mappedMemorySize,boolean isReadOnly){
  this.baseDir=baseDir;
  this.recordSizeAlignment=recordSizeAlignment;
  this.totalRecords=totalRecords;
  this.mappedMemorySize=mappedMemorySize;
  this.isReadOnly=isReadOnly;
  this.numStores=numStores;
  stores=new StoreEngine[numStores];
}
Program: 10362
Project: 10362
Buggy source:
@Override public boolean close(){
  for (  Thread t : comsumerThreads) {
    t.interrupt();
  }
  for (int i=0; i < threadNum; i++) {
    metrics.remove((MetricRegistry.name(TKStore.class,"String_Node_Str" + partitionId + "String_Node_Str"+ i,"String_Node_Str")));
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean close(){
  for (  Thread t : comsumerThreads) {
    t.interrupt();
  }
  for (int i=0; i < threadNum; i++) {
synchronized (metrics) {
      metrics.remove((MetricRegistry.name(TKStore.class,"String_Node_Str" + partitionId + "String_Node_Str"+ i,"String_Node_Str")));
    }
  }
  return true;
}
Program: 10363
Project: 10363
Buggy source:
@Override public boolean open(int partitionId){
  this.partitionId=partitionId;
  profileStore=PistachiosServer.getInstance().getLocalStorageEngine();
  try {
    logger.debug("String_Node_Str",partitionId);
    profileStore.open(partitionId);
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e);
    return false;
  }
  if (incomequeues == null)   incomequeues=new ArrayBlockingQueue[threadNum];
  comsumerThreads=new Thread[threadNum];
  for (int i=0; i < threadNum; i++) {
    try {
      if (incomequeues[i] == null)       incomequeues[i]=new ArrayBlockingQueue<DataOffset>(QUEUE_SIZE);
      comsumerThreads[i]=new Consumer(i);
      comsumerThreads[i].start();
      metrics.register(MetricRegistry.name(TKStore.class,"String_Node_Str" + partitionId + "String_Node_Str"+ i,"String_Node_Str"),new incomequeueSizeGauge(incomequeues[i]));
    }
 catch (    Exception e) {
      logger.error("String_Node_Str",e);
    }
  }
  try {
    reporter.start();
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e);
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean open(int partitionId){
  this.partitionId=partitionId;
  profileStore=PistachiosServer.getInstance().getLocalStorageEngine();
  try {
    logger.debug("String_Node_Str",partitionId);
    profileStore.open(partitionId);
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e);
    return false;
  }
  if (incomequeues == null)   incomequeues=new ArrayBlockingQueue[threadNum];
  comsumerThreads=new Thread[threadNum];
  for (int i=0; i < threadNum; i++) {
    try {
      if (incomequeues[i] == null)       incomequeues[i]=new ArrayBlockingQueue<DataOffset>(QUEUE_SIZE);
      comsumerThreads[i]=new Consumer(i);
      comsumerThreads[i].start();
synchronized (metrics) {
        metrics.register(MetricRegistry.name(TKStore.class,"String_Node_Str" + partitionId + "String_Node_Str"+ i,"String_Node_Str"),new incomequeueSizeGauge(incomequeues[i]));
      }
    }
 catch (    Exception e) {
      logger.error("String_Node_Str",e);
    }
  }
  try {
    reporter.start();
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e);
  }
  return true;
}
Program: 10364
Project: 10364
Buggy source:
public LocalStorageEngine(String baseDir,int numStores,int recordSizeAlignment,int totalRecords,long mappedMemorySize,boolean isReadOnly){
  this.baseDir=baseDir;
  this.recordSizeAlignment=recordSizeAlignment;
  this.totalRecords=totalRecords;
  this.mappedMemorySize=mappedMemorySize;
  this.isReadOnly=isReadOnly;
  this.numStores=numStores;
}

Fixed version (ground truth):
public LocalStorageEngine(String baseDir,int numStores,int recordSizeAlignment,int totalRecords,long mappedMemorySize,boolean isReadOnly){
  this.baseDir=baseDir;
  this.recordSizeAlignment=recordSizeAlignment;
  this.totalRecords=totalRecords;
  this.mappedMemorySize=mappedMemorySize;
  this.isReadOnly=isReadOnly;
  this.numStores=numStores;
  stores=new StoreEngine[numStores];
}
Program: 10365
Project: 10365
Buggy source:
public boolean equals(Object obj){
  if (this == obj)   return true;
  if (!(obj instanceof KeyValue))   return false;
  KeyValue that=(KeyValue)obj;
  return Arrays.equals(key,that.key) && (seqId == that.seqId) && Arrays.equals(value,that.value)&& (callback == that.callback);
}

Fixed version (ground truth):
public boolean equals(Object obj){
  if (this == obj)   return true;
  if (!(obj instanceof KeyValue))   return false;
  KeyValue that=(KeyValue)obj;
  return Arrays.equals(key,that.key) && (seqId == that.seqId) && Arrays.equals(value,that.value)&& (callback == that.callback)&& (op == that.op);
}
Program: 10366
Project: 10366
Buggy source:
public byte[] lookup(byte[] id,long partitionId) throws Exception {
  lookupRequests.mark();
  final Timer.Context context=lookupTimer.time();
  try {
    if (doNothing)     return null;
    StorePartition storePartition=PistachiosServer.storePartitionMap.get(partitionId);
    if (storePartition == null) {
      logger.info("String_Node_Str",partitionId,Joiner.on(',').withKeyValueSeparator("String_Node_Str").join(PistachiosServer.storePartitionMap));
      throw new Exception("String_Node_Str");
    }
    KeyValue toRetrun=storePartition.getFromWriteCache(id);
    if (toRetrun.op != Operator.DELETE) {
      logger.debug("String_Node_Str");
      return null;
    }
    if (toRetrun != null) {
      logger.debug("String_Node_Str");
      return toRetrun.value;
    }
    byte[] toRet=PistachiosServer.getInstance().getLocalStorageEngine().get(id,(int)partitionId);
    if (null != toRet) {
      Input input=new Input(toRet);
      ValueOffset valueOffset=kryo.readObject(input,ValueOffset.class);
      input.close();
      logger.debug("String_Node_Str",toRet,valueOffset);
      return valueOffset.value;
    }
    logger.info("String_Node_Str",id);
    return null;
  }
 catch (  Exception e) {
    logger.info("String_Node_Str",DefaultDataInterpreter.getDataInterpreter().interpretId(id),e);
    lookupFailureRequests.mark();
    throw e;
  }
 finally {
    context.stop();
  }
}

Fixed version (ground truth):
public byte[] lookup(byte[] id,long partitionId) throws Exception {
  lookupRequests.mark();
  final Timer.Context context=lookupTimer.time();
  try {
    if (doNothing)     return null;
    StorePartition storePartition=PistachiosServer.storePartitionMap.get(partitionId);
    if (storePartition == null) {
      logger.info("String_Node_Str",partitionId,Joiner.on(',').withKeyValueSeparator("String_Node_Str").join(PistachiosServer.storePartitionMap));
      throw new Exception("String_Node_Str");
    }
    KeyValue toRetrun=storePartition.getFromWriteCache(id);
    if (toRetrun != null && toRetrun.op != Operator.DELETE) {
      logger.debug("String_Node_Str");
      return null;
    }
 else     if (toRetrun != null) {
      logger.debug("String_Node_Str");
      return toRetrun.value;
    }
    byte[] toRet=PistachiosServer.getInstance().getLocalStorageEngine().get(id,(int)partitionId);
    if (null != toRet) {
      Input input=new Input(toRet);
      ValueOffset valueOffset=kryo.readObject(input,ValueOffset.class);
      input.close();
      logger.debug("String_Node_Str",toRet,valueOffset);
      return valueOffset.value;
    }
    logger.info("String_Node_Str",id);
    return null;
  }
 catch (  Exception e) {
    logger.info("String_Node_Str",DefaultDataInterpreter.getDataInterpreter().interpretId(id),e);
    lookupFailureRequests.mark();
    throw e;
  }
 finally {
    context.stop();
  }
}
Program: 10367
Project: 10367
Buggy source:
/** 
 * Visits an annotation and adds a corresponding node to the specified Element. Despite the name, this method is not inherited through any visitor interface. It is not intended for external calls.
 * @param parent the target of the annotation
 * @param annotation the annotation
 * @param primary whether this is a primary contract annotation
 * @param owner the owner of this annotation
 * @param p the element to add the created annotation to
 * @see ContractAnnotationModel
 */
@Requires({"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}) protected void visitAnnotation(Element parent,AnnotationMirror annotation,boolean primary,ClassName owner,ElementModel p){
  if (utils.isContractAnnotation(annotation)) {
    ContractAnnotationModel model=createContractModel(parent,annotation,primary,owner);
    p.addEnclosedElement(model);
  }
}

Fixed version (ground truth):
/** 
 * Visits an annotation and adds a corresponding node to the specified Element. Despite the name, this method is not inherited through any visitor interface. It is not intended for external calls.
 * @param parent the target of the annotation
 * @param annotation the annotation
 * @param primary whether this is a primary contract annotation
 * @param owner the owner of this annotation
 * @param p the element to add the created annotation to
 * @see ContractAnnotationModel
 */
@Requires({"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}) protected void visitAnnotation(Element parent,AnnotationMirror annotation,boolean primary,ClassName owner,ElementModel p){
  if (utils.isContractAnnotation(annotation)) {
    ContractAnnotationModel model=createContractModel(parent,annotation,primary,owner);
    if (model != null) {
      p.addEnclosedElement(model);
    }
  }
}
Program: 10369
Project: 10369
Buggy source:
@Override protected void visitAnnotation(Element parent,AnnotationMirror annotation,boolean primary,ClassName owner,ElementModel p){
  if (utils.isContractAnnotation(annotation)) {
    ContractAnnotationModel model=createContractModel(parent,annotation,primary,owner);
    if (type.getKind() == ElementKind.ANNOTATION_TYPE) {
      AnnotationSourceInfo asi=(AnnotationSourceInfo)model.getSourceInfo();
      diagnosticManager.warning("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ type.toString(),asi.getAnnotationValue().toString(),0,0,0,asi);
    }
 else {
      p.addEnclosedElement(model);
    }
  }
}

Fixed version (ground truth):
@Override protected void visitAnnotation(Element parent,AnnotationMirror annotation,boolean primary,ClassName owner,ElementModel p){
  if (utils.isContractAnnotation(annotation)) {
    ContractAnnotationModel model=createContractModel(parent,annotation,primary,owner);
    if (model == null) {
      return;
    }
    if (type.getKind() == ElementKind.ANNOTATION_TYPE) {
      AnnotationSourceInfo asi=(AnnotationSourceInfo)model.getSourceInfo();
      diagnosticManager.warning("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ type.toString(),asi.getAnnotationValue().toString(),0,0,0,asi);
    }
 else {
      p.addEnclosedElement(model);
    }
  }
}
Program: 10370
Project: 10370
Buggy source:
@Requires({"String_Node_Str","String_Node_Str"}) public static void err(String facility,String message,Throwable cause){
  System.err.println("String_Node_Str" + facility + "String_Node_Str"+ message+ (cause != null ? "String_Node_Str" : "String_Node_Str")+ "String_Node_Str");
  cause.printStackTrace();
  System.exit(1);
}

Fixed version (ground truth):
@Requires({"String_Node_Str","String_Node_Str"}) public static void err(String facility,String message,Throwable cause){
  System.err.println("String_Node_Str" + facility + "String_Node_Str"+ message+ (cause != null ? "String_Node_Str" : "String_Node_Str")+ "String_Node_Str");
  if (cause != null) {
    cause.printStackTrace();
  }
 else {
    new Exception().printStackTrace();
  }
  System.exit(1);
}
Program: 10372
Project: 10372
Buggy source:
@Requires("String_Node_Str") private void appendMethodDeclaration(MethodModel method){
  EnumSet<ElementModifier> modifiers=method.getModifiers();
  if (type.getKind() == ElementKind.INTERFACE) {
    modifiers.remove(ElementModifier.ABSTRACT);
  }
  appendModifiers(modifiers);
  append("String_Node_Str");
  appendGenericSignature(method.getTypeParameters());
  if (method.isConstructor()) {
    append("String_Node_Str");
    append(method.getEnclosingElement().getSimpleName());
  }
 else {
    append("String_Node_Str");
    append(method.getReturnType().getDeclaredName());
    append("String_Node_Str");
    append(method.getSimpleName());
  }
  append("String_Node_Str");
  Iterator<? extends VariableModel> it=method.getParameters().iterator();
  if (it.hasNext()) {
    for (; ; ) {
      VariableModel param=it.next();
      appendVariableDeclaration(param);
      if (!it.hasNext()) {
        break;
      }
      append("String_Node_Str");
    }
  }
  append("String_Node_Str");
  Set<? extends ClassName> exceptions=method.getExceptions();
  if (exceptions.size() != 0) {
    append("String_Node_Str");
    appendJoin(exceptions,"String_Node_Str");
  }
}

Fixed version (ground truth):
@Requires("String_Node_Str") private void appendMethodDeclaration(MethodModel method){
  EnumSet<ElementModifier> modifiers=method.getModifiers();
  if (type.getKind() == ElementKind.INTERFACE) {
    modifiers.remove(ElementModifier.ABSTRACT);
  }
  appendModifiers(modifiers);
  append("String_Node_Str");
  appendGenericSignature(method.getTypeParameters());
  if (method.isConstructor()) {
    append("String_Node_Str");
    append(method.getEnclosingElement().getSimpleName());
  }
 else {
    append("String_Node_Str");
    append(method.getReturnType().getDeclaredName());
    append("String_Node_Str");
    append(method.getSimpleName());
  }
  append("String_Node_Str");
  Iterator<? extends VariableModel> it=method.getParameters().iterator();
  if (it.hasNext()) {
    for (; ; ) {
      VariableModel param=it.next();
      appendVariableDeclaration(param);
      if (!it.hasNext()) {
        break;
      }
      append("String_Node_Str");
    }
  }
  append("String_Node_Str");
  Set<? extends TypeName> exceptions=method.getExceptions();
  if (exceptions.size() != 0) {
    append("String_Node_Str");
    appendJoin(exceptions,"String_Node_Str");
  }
}
Program: 10373
Project: 10373
Buggy source:
@Override public Void visitExecutable(ExecutableElement e,ElementModel p){
  MethodModel exec=null;
  String name=e.getSimpleName().toString();
  if (p.getKind() == ElementKind.ENUM) {
    ExecutableType t=(ExecutableType)e.asType();
    if (name.equals("String_Node_Str")) {
      if (t.getParameterTypes().isEmpty()) {
        return null;
      }
    }
 else     if (name.equals("String_Node_Str")) {
      List<TypeMirror> valueOfParameterTypes=Collections.singletonList(elementUtils.getTypeElement("String_Node_Str").asType());
      if (t.getParameterTypes().equals(valueOfParameterTypes)) {
        return null;
      }
    }
  }
  if (name.toString().equals("String_Node_Str")) {
    exec=new MethodModel();
  }
 else {
    exec=new MethodModel(ElementKind.METHOD,name,getTypeNameForType(e.getReturnType()));
  }
  copyModifiers(e,exec);
  List<? extends TypeParameterElement> genericTypes=e.getTypeParameters();
  for (  TypeParameterElement tp : genericTypes) {
    exec.addTypeParameter(getGenericTypeName(tp));
  }
  scan(e.getParameters(),exec);
  for (  TypeMirror tt : e.getThrownTypes()) {
    exec.addException(getClassNameForType(tt));
  }
  scanAnnotations(e,e.getAnnotationMirrors(),true,type.getKind() != ElementKind.INTERFACE,type.getName(),exec);
  p.addEnclosedElement(exec);
  addMethod(name,e,exec);
  return null;
}

Fixed version (ground truth):
@Override public Void visitExecutable(ExecutableElement e,ElementModel p){
  MethodModel exec=null;
  String name=e.getSimpleName().toString();
  if (p.getKind() == ElementKind.ENUM) {
    ExecutableType t=(ExecutableType)e.asType();
    if (name.equals("String_Node_Str")) {
      if (t.getParameterTypes().isEmpty()) {
        return null;
      }
    }
 else     if (name.equals("String_Node_Str")) {
      List<TypeMirror> valueOfParameterTypes=Collections.singletonList(elementUtils.getTypeElement("String_Node_Str").asType());
      if (t.getParameterTypes().equals(valueOfParameterTypes)) {
        return null;
      }
    }
  }
  if (name.toString().equals("String_Node_Str")) {
    exec=new MethodModel();
  }
 else {
    exec=new MethodModel(ElementKind.METHOD,name,getTypeNameForType(e.getReturnType()));
  }
  copyModifiers(e,exec);
  List<? extends TypeParameterElement> genericTypes=e.getTypeParameters();
  for (  TypeParameterElement tp : genericTypes) {
    exec.addTypeParameter(getGenericTypeName(tp));
  }
  scan(e.getParameters(),exec);
  for (  TypeMirror tt : e.getThrownTypes()) {
    exec.addException(getTypeNameForType(tt));
  }
  scanAnnotations(e,e.getAnnotationMirrors(),true,type.getKind() != ElementKind.INTERFACE,type.getName(),exec);
  p.addEnclosedElement(exec);
  addMethod(name,e,exec);
  return null;
}
Program: 10374
Project: 10374
Buggy source:
/** 
 * Constructs a new constructor model.
 */
public MethodModel(){
  super(ElementKind.CONSTRUCTOR,"String_Node_Str");
  exceptions=new HashSet<ClassName>();
  returnType=null;
}

Fixed version (ground truth):
/** 
 * Constructs a new constructor model.
 */
public MethodModel(){
  super(ElementKind.CONSTRUCTOR,"String_Node_Str");
  exceptions=new HashSet<TypeName>();
  returnType=null;
}
Program: 10375
Project: 10375
Buggy source:
@Requires("String_Node_Str") @Ensures("String_Node_Str") public void removeException(ClassName exception){
  exceptions.remove(exception);
}

Fixed version (ground truth):
@Requires("String_Node_Str") @Ensures("String_Node_Str") public void removeException(TypeName exception){
  exceptions.remove(exception);
}
Program: 10376
Project: 10376
Buggy source:
@Ensures("String_Node_Str") public Set<? extends ClassName> getExceptions(){
  return Collections.unmodifiableSet(exceptions);
}

Fixed version (ground truth):
@Ensures("String_Node_Str") public Set<? extends TypeName> getExceptions(){
  return Collections.unmodifiableSet(exceptions);
}
Program: 10377
Project: 10377
Buggy source:
@Requires("String_Node_Str") @Ensures("String_Node_Str") public void addException(ClassName exception){
  exceptions.add(exception);
}

Fixed version (ground truth):
@Requires("String_Node_Str") @Ensures("String_Node_Str") public void addException(TypeName exception){
  exceptions.add(exception);
}