nus-yam/ex-repair huggingface dataset:
Program: 46525
Project: 46525
Buggy source:
public void closeVpn(){
  try {
    LOG.debug("String_Node_Str");
    ScriptUtil script=new ScriptUtil();
    ShellUtil su=script.execute("String_Node_Str","String_Node_Str","String_Node_Str",CubeClientCoreProperties.getProperty("String_Node_Str"),"String_Node_Str");
    LOG.debug(su.getStandardOutput().toString());
    LOG.debug(su.getStandardError().toString());
    fireVpnConnectionState(VpnConnectionState.NM_VPN_CONNECTION_STATE_DISCONNECTED);
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e);
    fireVpnConnectionState(VpnConnectionState.NM_VPN_CONNECTION_STATE_FAILED);
  }
}

Fixed version (ground truth):
public void closeVpn(){
  try {
    LOG.debug("String_Node_Str");
    ScriptUtil script=new ScriptUtil();
    ShellUtil su=script.execute("String_Node_Str","String_Node_Str","String_Node_Str",CubeClientCoreProperties.getProperty("String_Node_Str"),"String_Node_Str");
    LOG.debug(su.getStandardOutput().toString());
    LOG.debug(su.getStandardError().toString());
    fireVpnConnectionState(VpnConnectionState.CUBEVPN_CONNECTION_STATE_DISCONNECTED);
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e);
    fireVpnConnectionState(VpnConnectionState.CUBEVPN_CONNECTION_STATE_FAILED);
  }
}
Program: 46526
Project: 46526
Buggy source:
@Override public void notifyConnectionStateUpdate(INetworkManager.NetworkConnectionState state){
switch (state) {
case CONNECTED:
    if (lastState == NetworkConnectionState.CONNECTING_VPN) {
      userIface.setSessionStateIcon(ConnectionIcon.CONNECTED_VPN);
    }
 else {
      userIface.setSessionStateIcon(ConnectionIcon.CONNECTED);
    }
  break;
case NOT_CONNECTED:
userIface.setSessionStateIcon(ConnectionIcon.NOT_CONNECTED);
break;
case CONNECTING_VPN:
userIface.setSessionStateIcon(ConnectionIcon.CONNECTING_VPN);
break;
case CONNECTING:
userIface.setSessionStateIcon(ConnectionIcon.CONNECTING);
break;
}
lastState=state;
}

Fixed version (ground truth):
@Override public void notifyConnectionStateUpdate(INetworkManager.NetworkConnectionState state){
switch (state) {
case CONNECTED_TO_CUBE:
    userIface.setSessionStateIcon(ConnectionIcon.CONNECTED);
  break;
case CONNECTED_TO_CUBE_BY_VPN:
userIface.setSessionStateIcon(ConnectionIcon.CONNECTED_VPN);
break;
case NOT_CONNECTED:
userIface.setSessionStateIcon(ConnectionIcon.NOT_CONNECTED);
break;
case CONNECTING_VPN:
userIface.setSessionStateIcon(ConnectionIcon.CONNECTING_VPN);
break;
case CONNECTING:
userIface.setSessionStateIcon(ConnectionIcon.CONNECTING);
break;
}
}
Program: 46528
Project: 46528
Buggy source:
@Override public void opened(){
  try {
    while (product.getProductState(vm) == VmProductState.STARTING) {
      Thread.sleep(500);
    }
    product.connectNic(vm,true);
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e);
    vm.setVpnState(VmVpnState.NOT_CONNECTED);
    vmModel.fireVmStateUpdatedEvent(vm);
  }
  vm.setVpnState(VmVpnState.CONNECTED);
  vmModel.fireVmStateUpdatedEvent(vm);
}

Fixed version (ground truth):
@Override public void opened(){
  try {
    while (product.getProductState(vm) == VmProductState.STARTING) {
      Thread.sleep(500);
    }
    product.connectNic(vm,true);
    vm.setVpnState(VmVpnState.CONNECTED);
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e);
    vm.setVpnState(VmVpnState.NOT_CONNECTED);
  }
  vmModel.fireVmStateUpdatedEvent(vm);
}
Program: 46529
Project: 46529
Buggy source:
public synchronized void showOnlyTheseWindow(Collection<Window> hideWindowList,Collection<Window> showWindowList){
  Display display=x11.XOpenDisplay(displayName);
  if (showWindowList != null) {
    for (    Window window : showWindowList) {
      LOG.error("String_Node_Str",window);
      x11.XMapWindow(display,window);
      x11.XMapRaised(display,window);
    }
  }
  if (hideWindowList != null) {
    for (    Window window : hideWindowList) {
      XWindowAttributes attributes=new XWindowAttributes();
      x11.XGetWindowAttributes(display,window,attributes);
      if (attributes.map_state != X11.IsUnmapped) {
        LOG.error("String_Node_Str",window);
        x11.XUnmapWindow(display,window);
      }
    }
  }
  x11.XFlush(display);
  x11.XCloseDisplay(display);
}

Fixed version (ground truth):
public synchronized void showOnlyTheseWindow(Collection<Window> hideWindowList,Collection<Window> showWindowList){
  Display display=x11.XOpenDisplay(displayName);
  if (showWindowList != null) {
    for (    Window window : showWindowList) {
      LOG.debug("String_Node_Str",window);
      x11.XMapWindow(display,window);
      x11.XMapRaised(display,window);
    }
  }
  if (hideWindowList != null) {
    for (    Window window : hideWindowList) {
      XWindowAttributes attributes=new XWindowAttributes();
      x11.XGetWindowAttributes(display,window,attributes);
      if (attributes.map_state != X11.IsUnmapped) {
        LOG.debug("String_Node_Str",window);
        x11.XUnmapWindow(display,window);
      }
    }
  }
  x11.XFlush(display);
  x11.XCloseDisplay(display);
}
Program: 46530
Project: 46530
Buggy source:
public void fireVmStateUpdatedEvent(Vm vm){
synchronized (stateListeners) {
    for (    IVmStateChangeListener l : stateListeners) {
      l.vmStateUpdated(vm);
    }
  }
}

Fixed version (ground truth):
public void fireVmStateUpdatedEvent(Vm vm){
synchronized (stateListeners) {
    for (    IVmStateChangeListener l : stateListeners) {
      try {
        l.vmStateUpdated(vm);
      }
 catch (      Exception e) {
        LOG.error("String_Node_Str");
      }
    }
  }
}
Program: 46531
Project: 46531
Buggy source:
@Override public void mountContainer(Container container,EncryptionKey key) throws ContainerException {
  try {
    LOG.debug("String_Node_Str");
    ShellUtil s=su.execute("String_Node_Str","String_Node_Str","String_Node_Str",container.getContainerFile().getAbsolutePath(),"String_Node_Str",key.getFile().getAbsolutePath(),"String_Node_Str",container.getMountpoint().getAbsolutePath());
    if (s.getExitValue() != 0) {
      LOG.error("String_Node_Str" + s.getStandardOutput());
      LOG.error("String_Node_Str" + s.getStandardError());
      throw new RuntimeException("String_Node_Str" + s.getExitValue() + "String_Node_Str");
    }
  }
 catch (  Exception e) {
    throw new ContainerException("String_Node_Str" + container + "String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override public void mountContainer(Container container,EncryptionKey key) throws ContainerException {
  try {
    ShellUtil s=su.execute("String_Node_Str","String_Node_Str","String_Node_Str",container.getContainerFile().getAbsolutePath(),"String_Node_Str",key.getFile().getAbsolutePath(),"String_Node_Str",container.getMountpoint().getAbsolutePath());
    if (s.getExitValue() == 0) {
      LOG.debug("String_Node_Str");
    }
 else {
      LOG.debug("String_Node_Str");
      try {
        unmountContainer(container);
      }
 catch (      Exception e) {
      }
      s=su.execute("String_Node_Str","String_Node_Str","String_Node_Str",container.getContainerFile().getAbsolutePath(),"String_Node_Str",key.getFile().getAbsolutePath(),"String_Node_Str",container.getMountpoint().getAbsolutePath());
    }
    if (s.getExitValue() != 0) {
      LOG.error("String_Node_Str" + s.getStandardOutput());
      LOG.error("String_Node_Str" + s.getStandardError());
      throw new RuntimeException("String_Node_Str" + s.getExitValue() + "String_Node_Str");
    }
  }
 catch (  Exception e) {
    throw new ContainerException("String_Node_Str" + container + "String_Node_Str",e);
  }
}
Program: 46533
Project: 46533
Buggy source:
@Override public void visitMethodInsn(int opcode,String owner,String name,String desc){
  addBipushInsn(mv,GlobalStateForInstrumentation.instance.getIid());
  addBipushInsn(mv,GlobalStateForInstrumentation.instance.getMid());
  mv.visitLdcInsn(owner);
  mv.visitLdcInsn(name);
  mv.visitLdcInsn(desc);
switch (opcode) {
case INVOKEVIRTUAL:
    mv.visitMethodInsn(INVOKESTATIC,Config.analysisClass,"String_Node_Str","String_Node_Str");
  break;
case INVOKESPECIAL:
mv.visitMethodInsn(INVOKESTATIC,Config.analysisClass,"String_Node_Str","String_Node_Str");
break;
case INVOKESTATIC:
mv.visitMethodInsn(INVOKESTATIC,Config.analysisClass,"String_Node_Str","String_Node_Str");
break;
case INVOKEINTERFACE:
mv.visitMethodInsn(INVOKESTATIC,Config.analysisClass,"String_Node_Str","String_Node_Str");
break;
default :
System.err.println("String_Node_Str" + opcode);
System.exit(1);
}
Label begin=new Label();
Label handler=new Label();
Label end=new Label();
mv.visitLabel(begin);
mv.visitMethodInsn(opcode,owner,name,desc);
mv.visitJumpInsn(GOTO,end);
mv.visitLabel(handler);
addBipushInsn(mv,GlobalStateForInstrumentation.instance.getIid());
addBipushInsn(mv,GlobalStateForInstrumentation.instance.getMid());
mv.visitMethodInsn(INVOKESTATIC,Config.analysisClass,"String_Node_Str","String_Node_Str");
mv.visitInsn(ATHROW);
mv.visitLabel(end);
addValueReadInsn(mv,desc,"String_Node_Str");
mv.visitTryCatchBlock(begin,handler,handler,null);
}

Fixed version (ground truth):
@Override public void visitMethodInsn(int opcode,String owner,String name,String desc){
  addBipushInsn(mv,GlobalStateForInstrumentation.instance.getIid());
  addBipushInsn(mv,GlobalStateForInstrumentation.instance.getMid());
  mv.visitLdcInsn(owner);
  mv.visitLdcInsn(name);
  mv.visitLdcInsn(desc);
switch (opcode) {
case INVOKEVIRTUAL:
    mv.visitMethodInsn(INVOKESTATIC,Config.analysisClass,"String_Node_Str","String_Node_Str");
  break;
case INVOKESPECIAL:
mv.visitMethodInsn(INVOKESTATIC,Config.analysisClass,"String_Node_Str","String_Node_Str");
break;
case INVOKESTATIC:
mv.visitMethodInsn(INVOKESTATIC,Config.analysisClass,"String_Node_Str","String_Node_Str");
break;
case INVOKEINTERFACE:
mv.visitMethodInsn(INVOKESTATIC,Config.analysisClass,"String_Node_Str","String_Node_Str");
break;
default :
System.err.println("String_Node_Str" + opcode);
System.exit(1);
}
Label begin=new Label();
Label handler=new Label();
Label end=new Label();
mv.visitLabel(begin);
mv.visitMethodInsn(opcode,owner,name,desc);
mv.visitJumpInsn(GOTO,end);
mv.visitLabel(handler);
mv.visitMethodInsn(INVOKESTATIC,Config.analysisClass,"String_Node_Str","String_Node_Str");
mv.visitInsn(ATHROW);
mv.visitLabel(end);
addValueReadInsn(mv,desc,"String_Node_Str");
mv.visitTryCatchBlock(begin,handler,handler,null);
}
Program: 46534
Project: 46534
Buggy source:
private void addBipushInsn(MethodVisitor mv,int val){
switch (val) {
case 0:
    mv.visitInsn(ICONST_0);
  break;
case 1:
mv.visitInsn(ICONST_1);
break;
case 2:
mv.visitInsn(ICONST_2);
break;
case 3:
mv.visitInsn(ICONST_3);
break;
case 4:
mv.visitInsn(ICONST_4);
break;
case 5:
mv.visitInsn(ICONST_5);
break;
default :
mv.visitIntInsn(BIPUSH,val);
}
}

Fixed version (ground truth):
private void addBipushInsn(MethodVisitor mv,int val){
switch (val) {
case 0:
    mv.visitInsn(ICONST_0);
  break;
case 1:
mv.visitInsn(ICONST_1);
break;
case 2:
mv.visitInsn(ICONST_2);
break;
case 3:
mv.visitInsn(ICONST_3);
break;
case 4:
mv.visitInsn(ICONST_4);
break;
case 5:
mv.visitInsn(ICONST_5);
break;
default :
mv.visitLdcInsn(new Integer(val));
break;
}
}
Program: 46535
Project: 46535
Buggy source:
public static void main(String[] args){
  foo(9,3,"String_Node_Str");
  System.out.println("String_Node_Str");
}

Fixed version (ground truth):
public static void main(String[] args){
  foo(9999999,3,"String_Node_Str");
  System.out.println("String_Node_Str");
}
Program: 46536
Project: 46536
Buggy source:
public ClusterGraph getMockGraph(String id){
  ClusterGraph g=new ClusterGraph(id,"String_Node_Str",id);
  Vertex[] vv=new Vertex[5];
  for (int i=0; i < vv.length; i++) {
    vv[i]=new Vertex("String_Node_Str" + Integer.toString(i) + "String_Node_Str","String_Node_Str");
    vv[i].setStyles(StyleSet.withImmutableStyles(styleFactory.href("String_Node_Str")));
    g.addVertex(vv[i]);
  }
  vv[1].setStyleClass("String_Node_Str");
  Edge[] ev=new Edge[4];
  for (int i=0; i < ev.length; i++) {
    ev[i]=new Edge("String_Node_Str" + Integer.toString(i),vv[0],vv[i + 1]);
    ev[i].setStyles(StyleSet.withImmutableStyles(styleFactory.href("String_Node_Str")));
    g.addEdge(ev[i]);
  }
  g.addEdge(new Edge(vv[1],vv[2]));
  g.addEdge(new Edge(vv[2],vv[3]));
  vv[4].getData().put("String_Node_Str","String_Node_Str");
  vv[4].getData().put("String_Node_Str","String_Node_Str");
  vv[4].getData().put("String_Node_Str","String_Node_Str");
  vv[4].setStyleClass("String_Node_Str");
  ev[1].setStyleClass("String_Node_Str");
  ev[2].setStyleClass("String_Node_Str");
  ev[3].setStyleClass("String_Node_Str");
  return g;
}

Fixed version (ground truth):
public ClusterGraph getMockGraph(String id){
  ClusterGraph g=new ClusterGraph(id,"String_Node_Str",id);
  Vertex[] vv=new Vertex[5];
  for (int i=0; i < vv.length; i++) {
    vv[i]=new Vertex("String_Node_Str" + Integer.toString(i) + "String_Node_Str","String_Node_Str");
    vv[i].setStyles(StyleSet.withImmutableStyles(styleFactory.href("String_Node_Str")));
    g.addVertex(vv[i]);
  }
  vv[1].setStyleClass("String_Node_Str");
  Edge[] ev=new Edge[4];
  for (int i=0; i < ev.length; i++) {
    ev[i]=new Edge("String_Node_Str" + Integer.toString(i),vv[0],vv[i + 1]);
    ev[i].setStyles(StyleSet.withImmutableStyles(styleFactory.href("String_Node_Str")));
    g.addEdge(ev[i]);
  }
  g.addEdge(new Edge(vv[1],vv[2]));
  g.addEdge(new Edge(vv[2],vv[3]));
  vv[4].getUserData().put("String_Node_Str","String_Node_Str");
  vv[4].getUserData().put("String_Node_Str","String_Node_Str");
  vv[4].getUserData().put("String_Node_Str","String_Node_Str");
  vv[4].setStyleClass("String_Node_Str");
  ev[1].setStyleClass("String_Node_Str");
  ev[2].setStyleClass("String_Node_Str");
  ev[3].setStyleClass("String_Node_Str");
  return g;
}
Program: 46537
Project: 46537
Buggy source:
private void onWrite() throws IOException {
  if (pendingRule != null) {
    pendingRule.performAction();
    return;
  }
  boolean keepScanning=true;
  RESCAN:   while (keepScanning) {
    if (isDeleteMode()) {
      if (buffer.deleteUntil(deleteUntilRule.pattern,inclusiveDelete)) {
        setDeleteModeOff();
        deleteUntilRule.performAction();
        continue RESCAN;
      }
      return;
    }
    keepScanning=false;
    while (buffer.size() >= longestPatternSize) {
      for (      PatternRule r : rules) {
        if (!r.isActive())         continue;
        if (buffer.startsWith(r.pattern)) {
          r.performAction();
          keepScanning=true;
          continue RESCAN;
        }
      }
      if (buffer.size() > 0)       buffer.writeFlush(1,out);
      if (buffer.isEmpty())       break;
    }
  }
}

Fixed version (ground truth):
private void onWrite() throws IOException {
  if (pendingRule != null) {
    pendingRule.performAction();
    if (pendingRule != null)     return;
  }
  boolean keepScanning=true;
  RESCAN:   while (keepScanning) {
    if (isDeleteMode()) {
      if (buffer.deleteUntil(deleteUntilRule.pattern,inclusiveDelete)) {
        setDeleteModeOff();
        deleteUntilRule.performAction();
        continue RESCAN;
      }
      return;
    }
    keepScanning=false;
    while (buffer.size() >= longestPatternSize) {
      for (      PatternRule r : rules) {
        if (!r.isActive())         continue;
        if (buffer.startsWith(r.pattern)) {
          r.performAction();
          if (pendingRule == null)           keepScanning=true;
          continue RESCAN;
        }
      }
      if (buffer.size() > 0)       buffer.writeFlush(1,out);
      if (buffer.isEmpty())       break;
    }
  }
}
Program: 46538
Project: 46538
Buggy source:
public static String idFor(EObject o){
  String result=null;
  EAttribute a=o.eClass().getEIDAttribute();
  if (a != null)   result=o.eGet(a).toString();
  if (result == null) {
    Resource r=o.eResource();
    if (r != null)     result=EcoreUtil.getURI(o).toString();
  }
  return result;
}

Fixed version (ground truth):
public static String idFor(EObject o){
  String result=null;
  EAttribute a=o.eClass().getEIDAttribute();
  if (a != null)   result=o.eGet(a).toString();
  return result;
}
Program: 46539
Project: 46539
Buggy source:
public void doConfig(){
  file=new Configuration(new File(plugin.getDataFolder(),"String_Node_Str"));
  file.load();
  if (new File(plugin.getDataFolder(),"String_Node_Str").exists()) {
    System.out.println("String_Node_Str");
  }
 else {
    file.setProperty("String_Node_Str","String_Node_Str");
    file.setProperty("String_Node_Str","String_Node_Str");
    file.setProperty("String_Node_Str","String_Node_Str");
    file.save();
    System.out.println("String_Node_Str");
  }
  damageDealt=file.getInt("String_Node_Str",damageDealt);
  damageDelay=file.getInt("String_Node_Str",damageDelay);
  perm=file.getString("String_Node_Str",perm);
  bootMod=file.getString("String_Node_Str",bootMod);
}

Fixed version (ground truth):
public void doConfig(){
  file=new Configuration(new File(plugin.getDataFolder(),"String_Node_Str"));
  file.load();
  if (new File(plugin.getDataFolder(),"String_Node_Str").exists()) {
    System.out.println("String_Node_Str");
  }
 else {
    file.setProperty("String_Node_Str",1);
    file.setProperty("String_Node_Str",1);
    file.setProperty("String_Node_Str","String_Node_Str");
    file.save();
    System.out.println("String_Node_Str");
  }
  damageDealt=file.getInt("String_Node_Str",damageDealt);
  damageDelay=file.getInt("String_Node_Str",damageDelay);
  perm=file.getString("String_Node_Str",perm);
  bootMod=file.getString("String_Node_Str",bootMod);
}
Program: 46540
Project: 46540
Buggy source:
public void onDisable(){
  System.out.println("String_Node_Str");
}

Fixed version (ground truth):
public void onDisable(){
  Bukkit.getServer().getScheduler().cancelTask(playerListener.id);
  Bukkit.getServer().getScheduler().cancelAllTasks();
  System.out.println("String_Node_Str");
}
Program: 46543
Project: 46543
Buggy source:
@Override public void run(){
  if (AWTUtilities.getWindowOpacity(jDialog) > 0.01f) {
    AWTUtilities.setWindowOpacity(jDialog,AWTUtilities.getWindowOpacity(jDialog) - 0.01f);
  }
 else {
    jDialog.dispose();
  }
}

Fixed version (ground truth):
@Override public void run(){
  if (AWTUtilities.getWindowOpacity(jWindow) > 0.005f) {
    AWTUtilities.setWindowOpacity(jWindow,AWTUtilities.getWindowOpacity(jWindow) - 0.005f);
  }
 else {
    jWindow.dispose();
  }
}
Program: 46544
Project: 46544
Buggy source:
public Fader(JDialog jDialog){
  this.jDialog=jDialog;
}

Fixed version (ground truth):
public Fader(JWindow jWindow){
  this.jWindow=jWindow;
}
Program: 46546
Project: 46546
Buggy source:
public void addNotification(String notificationHTML) throws IOException {
  clearInvisible();
  Integer lastX=null;
  Integer lastY=null;
  if (size() > 0) {
    NotificationPopup lastNotification=getLast();
    lastX=lastNotification.getX();
    lastY=lastNotification.getY();
  }
  GraphicsEnvironment ge=GraphicsEnvironment.getLocalGraphicsEnvironment();
  GraphicsConfiguration dc=GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration();
  final Dimension screenSize=Toolkit.getDefaultToolkit().getScreenSize();
  final Insets scnMax=Toolkit.getDefaultToolkit().getScreenInsets(dc);
  final int screenBottomEdge=scnMax.bottom;
  final int screenTopEdge=scnMax.top;
  final int screenLeftEdge=scnMax.left;
  final int screenRightEdge=scnMax.left;
  int x=0;
  int y=0;
  int maxX=(screenSize.width - NotificationPopup.WIDTH - screenRightEdge- NOTIFICATION_MARGIN_PIXELS_LEFT_RIGHT);
  int maxY=screenSize.height - screenBottomEdge - NotificationPopup.HEIGHT;
  if (lastX == null) {
    x=maxX;
  }
 else {
    x=lastX;
  }
  if (lastY == null) {
    y=screenTopEdge;
  }
 else {
    y=(lastY + NotificationPopup.HEIGHT + NOTIFICATION_MARGIN_PIXELS_TOP_BOTTOM);
  }
  if (y > maxY) {
    y=screenTopEdge;
    x=getFreeColumnX(maxX);
  }
  if (x < screenLeftEdge) {
    x=maxX;
  }
  NotificationPopup newNotification=new NotificationPopup(notificationHTML,x,y,true);
  this.add(newNotification);
  newNotification.show();
}

Fixed version (ground truth):
public void addNotification(String notificationHTML) throws IOException {
  clearInvisible();
  Integer lastX=null;
  Integer lastY=null;
  if (size() > 0) {
    NotificationPopup lastNotification=getLast();
    lastX=lastNotification.getX();
    lastY=lastNotification.getY();
  }
  GraphicsEnvironment ge=GraphicsEnvironment.getLocalGraphicsEnvironment();
  GraphicsConfiguration dc=GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration();
  final Dimension screenSize=Toolkit.getDefaultToolkit().getScreenSize();
  final Insets scnMax=Toolkit.getDefaultToolkit().getScreenInsets(dc);
  final int screenBottomEdge=scnMax.bottom;
  final int screenTopEdge=scnMax.top;
  final int screenLeftEdge=scnMax.left;
  final int screenRightEdge=scnMax.left;
  int x=0;
  int y=0;
  int maxX=(screenSize.width - NotificationPopup.WIDTH - screenRightEdge- NOTIFICATION_MARGIN_PIXELS_LEFT_RIGHT);
  int maxY=screenSize.height - screenBottomEdge - NotificationPopup.HEIGHT;
  if (lastX == null) {
    x=maxX;
  }
 else {
    x=lastX;
  }
  if (lastY == null) {
    y=screenTopEdge;
  }
 else {
    y=(lastY + NotificationPopup.HEIGHT + NOTIFICATION_MARGIN_PIXELS_TOP_BOTTOM);
  }
  if (y > maxY) {
    y=screenTopEdge;
    x=getFreeColumnX(maxX);
  }
  if (x < screenLeftEdge) {
    x=maxX;
  }
  NotificationPopup newNotification=new NotificationPopup(notificationHTML,x,y,true);
  JWindow notificationWindow=new JWindow(newNotification);
  this.add(newNotification);
  newNotification.setVisible(true);
}
Program: 46547
Project: 46547
Buggy source:
/** 
 * @return mouse Y position in world coordinates.
 */
public static int getY(){
  return -(int)((org.lwjgl.input.Mouse.getY() - Main.HEIGHT / 2) * WorldRenderer.scale + WorldRenderer.focalPoint.y);
}

Fixed version (ground truth):
/** 
 * @return mouse Y position in world coordinates.
 */
public static int getY(){
  return (int)-((org.lwjgl.input.Mouse.getY() - Main.HEIGHT / 2) * WorldRenderer.scale - WorldRenderer.focalPoint.y);
}
Program: 46548
Project: 46548
Buggy source:
public void render(){
  GL11.glEnableClientState(GL11.GL_VERTEX_ARRAY);
  ARBBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB,vertexBufferID);
  GL11.glVertexPointer(2,GL11.GL_FLOAT,0,0);
  if (colourBufferID > -1) {
    GL11.glEnableClientState(GL11.GL_COLOR_ARRAY);
    ARBBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB,colourBufferID);
    GL11.glColorPointer(4,GL11.GL_FLOAT,0,0);
  }
  if (indexBufferID > -1) {
    ARBBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ELEMENT_ARRAY_BUFFER_ARB,indexBufferID);
    GL12.glDrawRangeElements(GL11.GL_QUADS,0,indexCount,indexCount,GL11.GL_UNSIGNED_INT,0);
  }
 else {
    GL11.glDrawArrays(GL11.GL_TRIANGLES,0,vertexCount / 2);
  }
  GL11.glDisableClientState(GL11.GL_VERTEX_ARRAY);
  GL11.glDisableClientState(GL11.GL_COLOR_ARRAY);
}

Fixed version (ground truth):
public void render(){
  GL11.glEnableClientState(GL11.GL_VERTEX_ARRAY);
  ARBBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB,vertexBufferID);
  GL11.glVertexPointer(2,GL11.GL_FLOAT,0,0);
  if (colourBufferID > -1) {
    GL11.glEnableClientState(GL11.GL_COLOR_ARRAY);
    ARBBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB,colourBufferID);
    GL11.glColorPointer(4,GL11.GL_FLOAT,0,0);
  }
  if (indexBufferID > -1) {
    ARBBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ELEMENT_ARRAY_BUFFER_ARB,indexBufferID);
    GL12.glDrawRangeElements(GL11.GL_TRIANGLES,0,indexCount,indexCount,GL11.GL_UNSIGNED_INT,0);
  }
 else {
    GL11.glDrawArrays(GL11.GL_TRIANGLES,0,vertexCount / 2);
  }
  GL11.glDisableClientState(GL11.GL_VERTEX_ARRAY);
  GL11.glDisableClientState(GL11.GL_COLOR_ARRAY);
}
Program: 46549
Project: 46549
Buggy source:
private void performHitTestToSelectImage(float x,float y){
  for (  MongoImage image : mImages) {
    if (image.containsPoint(x,y)) {
      Log.d(TAG,String.format("String_Node_Str",x,y));
      mSelectedImage=image;
      break;
    }
  }
}

Fixed version (ground truth):
private void performHitTestToSelectImage(float x,float y){
  for (int imageIndex=mImages.size() - 1; imageIndex >= 0; imageIndex--) {
    MongoImage image=mImages.get(imageIndex);
    if (image.containsPoint(x,y)) {
      Log.d(TAG,String.format("String_Node_Str",x,y));
      mSelectedImage=image;
      break;
    }
  }
}
Program: 46550
Project: 46550
Buggy source:
@Override public void onActivityResult(int requestCode,int resultCode,Intent data){
  if (requestCode == TAKE_PHOTO_REQUEST) {
    Intent annotateImageIntent=new Intent(this,AnnotateImage.class);
    annotateImageIntent.putExtra(MediaStore.EXTRA_OUTPUT,mImageUri);
    startActivity(annotateImageIntent);
  }
}

Fixed version (ground truth):
@Override public void onActivityResult(int requestCode,int resultCode,Intent data){
  if (requestCode == TAKE_PHOTO_REQUEST && resultCode != RESULT_CANCELED) {
    Intent annotateImageIntent=new Intent(this,AnnotateImage.class);
    annotateImageIntent.putExtra(MediaStore.EXTRA_OUTPUT,mImageUri);
    startActivity(annotateImageIntent);
  }
}
Program: 46551
Project: 46551
Buggy source:
/** 
 * @param exp the exp to add
 */
public void addExp(int exp){
  setExp((getExp() + exp));
}

Fixed version (ground truth):
/** 
 * @param exp the exp to add
 */
public void addExp(int exp){
  setExp(this.exp + exp);
  checkLevelUP();
}
Program: 46552
Project: 46552
Buggy source:
/** 
 * @param exp the exp to remove
 */
public void removeExp(int exp){
  setExp((getExp() - exp));
}

Fixed version (ground truth):
/** 
 * @param exp the exp to remove
 */
public void removeExp(int exp){
  setExp(this.exp - exp);
}
Program: 46553
Project: 46553
Buggy source:
@Override public void onPluginEnable(PluginEnableEvent event){
  if (event.getPlugin() != plugin) {
    RCPermissions.onEnable(event.getPlugin());
    RCEconomy.onEnable(event.getPlugin());
  }
}

Fixed version (ground truth):
@Override public void onPluginEnable(PluginEnableEvent event){
  RCPermissions.onEnable(event.getPlugin());
  RCEconomy.onEnable(event.getPlugin());
}
Program: 46556
Project: 46556
Buggy source:
/** 
 * sets the new Level and Group
 * @param level
 */
public void setLevel(int level){
  String group="String_Node_Str" + getLevel();
  if (RCPermissions.removeParent(player,group)) {
    this.level=level;
    group="String_Node_Str" + level;
    RCPermissions.addParent(player,group);
  }
}

Fixed version (ground truth):
/** 
 * sets the new Level and Group
 * @param level
 */
public void setLevel(int level){
  String group="String_Node_Str" + getLevel();
  if (RCPermissions.removeParent(player,group)) {
    this.level=level;
    group="String_Node_Str" + level;
    RCPermissions.addParent(player,group);
    RCPermissions.saveAll();
  }
}
Program: 46557
Project: 46557
Buggy source:
public static void listPage(String[] array,Player player,int page){
  page=page - 1;
  if (array != null) {
    for (int i=page * 5; i < i + 5; i++) {
      if (!(array.length <= i))       Messaging.sendNoTag(player,array[i]);
    }
  }
}

Fixed version (ground truth):
public static void listPage(String[] array,Player player,int page){
  if (array != null) {
    if (page == 1) {
      for (int i=0; i < 5; i++) {
        if (!(array.length <= i))         Messaging.sendNoTag(player,array[i]);
      }
    }
 else {
      page-=1;
      for (int i=page * 5; i < i + 5; i++) {
        if (!(array.length <= i))         Messaging.sendNoTag(player,array[i]);
      }
    }
  }
}
Program: 46558
Project: 46558
Buggy source:
public boolean resetSkills(){
  if (skills == null)   return false;
  for (  DBSkills s : skills) {
    removeSkill(s.getSkillName());
  }
  this.account.subtract(getResetCost());
  return true;
}

Fixed version (ground truth):
public boolean resetSkills(boolean removeMoney){
  if (skills == null)   return false;
  for (  DBSkills s : skills) {
    removeSkill(s.getSkillName());
  }
  if (removeMoney == true)   this.account.subtract(getResetCost());
  return true;
}
Program: 46559
Project: 46559
Buggy source:
public void setLevel(int level){
  this.level=level;
}

Fixed version (ground truth):
public void setLevel(int level){
  String group="String_Node_Str" + getLevel();
  if (RCPermissions.removeParent(player,group)) {
    this.level=level;
    group="String_Node_Str" + level;
    RCPermissions.addParent(player,group);
  }
}
Program: 46560
Project: 46560
Buggy source:
/** 
 * main function for the levelup event
 * @param ignoreItems
 * @return lvlup successfull or failed
 */
public boolean lvlup(boolean ignoreItems){
  checkForItems();
  if (ignoreItems == true) {
    if (getLevel() == -1 && getExp() != 0)     setExp(0);
    if (getLevel() == -1) {
      Messaging.sendMessage(player,"String_Node_Str" + ChatColor.YELLOW + RCPermissions.getPrimaryGroup(player)+ ChatColor.WHITE+ "String_Node_Str");
      return false;
    }
 else     if (nextLevel(true)) {
      return true;
    }
    Messaging.sendMessage(player,"String_Node_Str" + ChatColor.YELLOW + RCConfig.maxLevel+ ChatColor.WHITE+ "String_Node_Str");
    return true;
  }
 else {
    if (hasExpForLevel(getLevel() + 1)) {
      if (getLevel() == -1) {
        Messaging.sendMessage(player,"String_Node_Str" + ChatColor.YELLOW + RCPermissions.getPrimaryGroup(player)+ ChatColor.WHITE+ "String_Node_Str");
        return false;
      }
      if (!nextLevel(false)) {
        Messaging.sendMessage(player,"String_Node_Str" + ChatColor.YELLOW + RCConfig.maxLevel+ ChatColor.WHITE+ "String_Node_Str");
        return false;
      }
      return true;
    }
 else {
      Messaging.sendMessage(player,ChatColor.RED + "String_Node_Str");
      Messaging.sendMessage(player,"String_Node_Str" + ChatColor.YELLOW + getExp()+ ChatColor.WHITE+ "String_Node_Str"+ ChatColor.YELLOW+ getExpToNextLevel()+ ChatColor.WHITE+ "String_Node_Str");
      return false;
    }
  }
}

Fixed version (ground truth):
/** 
 * main function for the levelup event
 * @param ignoreItems
 * @return lvlup successfull or failed
 */
public boolean lvlup(boolean ignoreItems){
  checkForItems();
  if (ignoreItems == true) {
    if (getLevel() == -1 && getExp() != 0)     setExp(0);
    if (getLevel() == -1) {
      Messaging.sendMessage(player,Language.cantLevel);
      return false;
    }
 else     if (nextLevel(true)) {
      return true;
    }
    Messaging.sendMessage(player,Language.reachedMaxLevel);
    return true;
  }
 else {
    if (hasExpForLevel(getLevel() + 1)) {
      if (getLevel() == -1) {
        Messaging.sendMessage(player,Language.cantLevel);
        return false;
      }
      if (!nextLevel(false)) {
        Messaging.sendMessage(player,Language.reachedMaxLevel);
        return false;
      }
      return true;
    }
 else {
      Messaging.sendMessage(player,ChatColor.RED + Language.youDontHaveEnough + "String_Node_Str");
      Messaging.sendMessage(player,Language.youOnlyHave + "String_Node_Str" + ChatColor.YELLOW+ getExp()+ ChatColor.WHITE+ "String_Node_Str"+ ChatColor.YELLOW+ getExpToNextLevel()+ ChatColor.WHITE+ "String_Node_Str"+ Language.forTheNextLevel);
      return false;
    }
  }
}
Program: 46561
Project: 46561
Buggy source:
public void addSkill(String skillName){
  DBSkills skillsdb=new DBSkills();
  SingleSkill skill=SkillsConfig.getSingleSkill(skillName);
  skillsdb.setPlayer(player);
  skillsdb.setSkillName(skillName);
  skillsdb.setGroupName(skill.getGroup());
  skillsdb.setCosts(skill.getCosts());
  skillsdb.setSkillPoints(skill.getSkillpoints());
  skillsdb.setSkillLevel(skill.getLevel());
  increaseSkillCount();
  addSpendSkillpoints(skill.getSkillpoints());
  removeSkillPoints(skill.getSkillpoints());
  RCPlayer.plugin.getDatabase().save(skillsdb);
}

Fixed version (ground truth):
public boolean addSkill(String skillName,boolean removeSkillpoints){
  DBSkills skillsdb=new DBSkills();
  SingleSkill skill=SkillsConfig.getSingleSkill(skillName);
  if (RCPermissions.addParent(player,skill.getGroup())) {
    skillsdb.setPlayer(player);
    skillsdb.setSkillName(skillName);
    skillsdb.setGroupName(skill.getGroup());
    skillsdb.setCosts(skill.getCosts());
    skillsdb.setSkillPoints(skill.getSkillpoints());
    skillsdb.setSkillLevel(skill.getLevel());
    increaseSkillCount();
    if (removeSkillpoints) {
      addSpendSkillpoints(skill.getSkillpoints());
      removeSkillPoints(skill.getSkillpoints());
    }
    RCPlayer.plugin.getDatabase().save(skillsdb);
    return true;
  }
  return false;
}
Program: 46562
Project: 46562
Buggy source:
/** 
 * Remove itemID and turns it into EXP
 * @return hasItems
 */
public boolean checkForItems(){
  ItemStack items=new ItemStack(RCConfig.itemID,2304);
  if (player.getInventory().contains(RCConfig.itemID)) {
    HashMap<Integer,ItemStack> difference=player.getInventory().removeItem(items);
    int exp=0;
    for (    ItemStack s : difference.values())     exp+=s.getAmount();
    exp=2304 - exp;
    addExp(exp);
    Messaging.sendMessage(player,"String_Node_Str" + ChatColor.YELLOW + exp+ "String_Node_Str"+ ChatColor.WHITE+ RCConfig.itemName+ "String_Node_Str");
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Remove itemID and turns it into EXP
 * @return hasItems
 */
public boolean checkForItems(){
  ItemStack items=new ItemStack(RCConfig.itemID,2304);
  if (player.getInventory().contains(RCConfig.itemID)) {
    HashMap<Integer,ItemStack> difference=player.getInventory().removeItem(items);
    int exp=0;
    for (    ItemStack s : difference.values())     exp+=s.getAmount();
    exp=2304 - exp;
    addExp(exp);
    Messaging.sendMessage(player,Language.your + "String_Node_Str" + ChatColor.YELLOW+ exp+ "String_Node_Str"+ ChatColor.WHITE+ RCConfig.itemName+ "String_Node_Str"+ Language.haveBeenExchangedForExp+ "String_Node_Str");
    return true;
  }
  return false;
}
Program: 46563
Project: 46563
Buggy source:
private void loadLevelDatabase(){
  lvldb=RCPlayer.plugin.getDatabase().find(DBLevelup.class).where().ieq("String_Node_Str",this.player.getName()).findUnique();
  if (lvldb == null) {
    lvldb=new DBLevelup();
    lvldb.setPlayer(player);
    lvldb.setLevel(0);
    lvldb.setExpToNextLevel(getExpToLevel(getLevel() + 1));
    lvldb.setExp(0);
    lvldb.setJoined(this.lastJoinDate);
    lvldb.setSkillpoints(0);
    lvldb.setSkillResetCount(0);
    lvldb.setSkillCount(skills.size());
    lvldb.setSpendSkillpoints(getSpendSkillpoints());
    RCPlayer.plugin.getDatabase().save(lvldb);
  }
}

Fixed version (ground truth):
private void loadLevelDatabase(){
  lvldb=RCPlayer.plugin.getDatabase().find(DBLevelup.class).where().ieq("String_Node_Str",this.player.getName()).findUnique();
  if (lvldb == null) {
    lvldb=new DBLevelup();
    lvldb.setPlayer(player);
    lvldb.setLevel(0);
    lvldb.setExpToNextLevel(getExpToLevel(getLevel() + 1));
    lvldb.setExp(0);
    lvldb.setJoined(this.lastJoinDate);
    lvldb.setSkillpoints(0);
    lvldb.setSkillResetCount(0);
    lvldb.setSkillCount(skills.size());
    lvldb.setSpendSkillpoints(getSpendSkillpoints());
  }
}
Program: 46564
Project: 46564
Buggy source:
/** 
 * increases the level by 1 if max level no reached
 * @param ignoreEXP
 * @return false if max level reached
 */
private boolean nextLevel(boolean b){
  if (getLevel() + 1 <= RCConfig.maxLevel) {
    if (b == false) {
      removeExp(getExpToNextLevel());
    }
    setLevel((getLevel() + 1));
    setExpToNextLevel();
    if (grantSkillPoints()) {
      addSkillPoints(RCConfig.skillPoints);
    }
    String group="String_Node_Str" + getLevel();
    RCPermissions.promote(player,RCConfig.track,group);
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * increases the level by 1 if max level no reached
 * @param ignoreEXP
 * @return false if max level reached
 */
private boolean nextLevel(boolean b){
  if (getLevel() + 1 <= RCConfig.maxLevel) {
    if (b == false) {
      removeExp(getExpToNextLevel());
    }
    setLevel((getLevel() + 1));
    setExpToNextLevel();
    if (grantSkillPoints()) {
      addSkillPoints(RCConfig.skillPoints);
    }
    return true;
  }
  return false;
}
Program: 46565
Project: 46565
Buggy source:
public void addSkillPoints(int points){
  this.skillPoints+=points;
  Messaging.sendMessage(player,"String_Node_Str" + Messaging.colorizeText("String_Node_Str" + points,ChatColor.YELLOW) + "String_Node_Str");
}

Fixed version (ground truth):
public void addSkillPoints(int points){
  this.skillPoints+=points;
}
Program: 46566
Project: 46566
Buggy source:
public boolean grantSkillPoints(){
  if (getLevel() != 0 && getLevel() % RCConfig.skillpointsInterval == 0)   return true;
  return false;
}

Fixed version (ground truth):
public boolean grantSkillPoints(){
  if (getLevel() != 0 && getLevel() % RCConfig.skillpointsInterval == 0) {
    Messaging.sendMessage(player,"String_Node_Str" + RCConfig.skillPoints + "String_Node_Str");
    return true;
  }
  return false;
}
Program: 46567
Project: 46567
Buggy source:
public String[] getBuyableSkills(){
  int i=0;
  for (  String s : SkillsConfig.skills) {
    if (SkillsConfig.getSingleSkill(s).getLevel() <= getLevel())     i++;
  }
  String[] buyableSkills=new String[i];
  i=0;
  for (  String s : SkillsConfig.skills) {
    if (SkillsConfig.getSingleSkill(s).getLevel() <= getLevel()) {
      if (!skills.contains(s)) {
        buyableSkills[i]=s;
      }
      i++;
    }
  }
  return buyableSkills;
}

Fixed version (ground truth):
public String[] getBuyableSkills(){
  int i=0;
  for (  String s : SkillsConfig.skills) {
    if (SkillsConfig.getSingleSkill(s).getLevel() <= getLevel())     i++;
  }
  String[] buyableSkills=new String[i];
  i=0;
  for (  String s : SkillsConfig.skills) {
    if (SkillsConfig.getSingleSkill(s).getLevel() <= getLevel()) {
      if (!skills.contains(s)) {
        buyableSkills[i]=s + "String_Node_Str" + Messaging.colorizeText("String_Node_Str" + SkillsConfig.getSingleSkill(s).getId(),ChatColor.YELLOW)+ "String_Node_Str";
      }
      i++;
    }
  }
  return buyableSkills;
}
Program: 46568
Project: 46568
Buggy source:
/** 
 * LevelUP Check for the PlayerJoin Event
 */
public void checkLevelUP(){
  if (lvlup(false)) {
    Messaging.sendMessage(player,"String_Node_Str" + ChatColor.YELLOW + getLevel());
    Messaging.sendMessage(player,"String_Node_Str" + ChatColor.YELLOW + getExpToNextLevel()+ "String_Node_Str");
    Messaging.sendMessage(this.server,player.getName() + "String_Node_Str" + ChatColor.YELLOW+ getLevel());
    RCLogger.info("String_Node_Str" + player.getName() + "String_Node_Str"+ getLevel());
  }
}

Fixed version (ground truth):
/** 
 * LevelUP Check for the PlayerJoin Event
 */
public void checkLevelUP(){
  if (lvlup(false)) {
    Messaging.sendMessage(player,Language.youAreNowLevel + "String_Node_Str" + ChatColor.YELLOW+ getLevel());
    Messaging.sendMessage(player,Language.youGot + "String_Node_Str" + ChatColor.YELLOW+ getExpToNextLevel()+ "String_Node_Str"+ Language.deducted+ "String_Node_Str");
    Messaging.sendMessage(this.server,player.getName() + "String_Node_Str" + Language.isNowLevel+ "String_Node_Str"+ ChatColor.YELLOW+ getLevel());
    RCLogger.info("String_Node_Str" + player.getName() + "String_Node_Str"+ Language.isNowLevel+ "String_Node_Str"+ getLevel());
  }
}
Program: 46569
Project: 46569
Buggy source:
public void removeSkill(String skillName){
  DBSkills skillsdb=RCPlayer.plugin.getDatabase().find(DBSkills.class).where().ieq("String_Node_Str",skillName).where().ieq("String_Node_Str",player.getName()).findUnique();
  decreaseSkillCount();
  addSkillPoints(skillsdb.getSkillPoints());
  RCPlayer.plugin.getDatabase().delete(skillsdb);
  RCPlayer.plugin.getDatabase().save(skillsdb);
}

Fixed version (ground truth):
public boolean removeSkill(String skillName){
  DBSkills skillsdb=RCPlayer.plugin.getDatabase().find(DBSkills.class).where().ieq("String_Node_Str",skillName).where().ieq("String_Node_Str",player.getName()).findUnique();
  if (RCPermissions.removeParent(player,skillsdb.getGroupName())) {
    decreaseSkillCount();
    addSkillPoints(skillsdb.getSkillPoints());
    RCPlayer.plugin.getDatabase().delete(skillsdb);
    RCPlayer.plugin.getDatabase().save(skillsdb);
    return true;
  }
  return false;
}
Program: 46570
Project: 46570
Buggy source:
public void onEnable(){
  name=this.getDescription().getName();
  version=this.getDescription().getVersion();
  RCLogger.initialize(Logger.getLogger("String_Node_Str"));
  PluginManager pm=getServer().getPluginManager();
  pm.registerEvent(Event.Type.PLUGIN_ENABLE,pluginListener,Priority.Monitor,this);
  pm.registerEvent(Event.Type.PLAYER_JOIN,playerListener,Priority.Low,this);
  RCConfig.initialize(this);
  SkillsConfig.initialize(this);
  setupDatabase();
  RCPlayer.initialize(this);
  RCPermissions.initialize(this);
  RCEconomy.initialize();
  setupCommands();
  RCLogger.info(name + "String_Node_Str" + version+ "String_Node_Str");
}

Fixed version (ground truth):
public void onEnable(){
  name=this.getDescription().getName();
  version=this.getDescription().getVersion();
  RCLogger.initialize(Logger.getLogger("String_Node_Str"));
  PluginManager pm=getServer().getPluginManager();
  pm.registerEvent(Event.Type.PLUGIN_ENABLE,pluginListener,Priority.Monitor,this);
  pm.registerEvent(Event.Type.PLAYER_JOIN,playerListener,Priority.Low,this);
  RCConfig.initialize(this);
  SkillsConfig.initialize(this);
  Language.initialize(this);
  setupDatabase();
  RCPlayer.initialize(this);
  RCPermissions.initialize(this);
  RCEconomy.initialize();
  setupCommands();
  RCLogger.info(name + "String_Node_Str" + version+ "String_Node_Str");
}
Program: 46572
Project: 46572
Buggy source:
public void onBlockBreak(BlockBreakEvent event){
  if (event.getPlayer().getGameMode() == GameMode.CREATIVE) {
    event.setCancelled(true);
    BlockDamageEvent bde=new BlockDamageEvent(event.getPlayer(),event.getBlock(),event.getPlayer().getItemInHand(),false);
    bde.setCancelled(true);
    this.onBlockDamage(bde);
  }
}

Fixed version (ground truth):
public void onBlockBreak(BlockBreakEvent event){
  if (plugin.enabled(event.getPlayer()) && event.getPlayer().getGameMode() == GameMode.CREATIVE && event.getPlayer().getItemInHand().getTypeId() == plugin.dlUsers.get(event.getPlayer()).wandItem) {
    DLPlayerConfig pConfig=plugin.dlUsers.get(event.getPlayer());
    if (!(event.getBlock().getType() == (pConfig.chestMode ? Material.CHEST : Material.DISPENSER)) && !(pConfig.blockAreaMode)) {
      return;
    }
    BlockDamageEvent bde=new BlockDamageEvent(event.getPlayer(),event.getBlock(),event.getPlayer().getItemInHand(),false);
    this.onBlockDamage(bde);
    event.setCancelled(true);
  }
}
Program: 46573
Project: 46573
Buggy source:
/** 
 * Toggles the user's area mode
 */
void toggleAreaMode(){
  if (this.blockAreaMode == true) {
    this.disableAreaMode();
    this.fillOnce=false;
    this.clearOnce=false;
    this.singleClearMode=false;
    this.singleFillMode=false;
    this.singleClearMode=false;
    this.singleFillMode=false;
    this.clearOnce=false;
    this.fillOnce=false;
    player.sendMessage("String_Node_Str");
  }
 else {
    this.blockAreaMode=true;
    player.sendMessage(ChatColor.DARK_AQUA + "String_Node_Str");
  }
  if (plugin.debug)   log.info("String_Node_Str" + player.getName() + "String_Node_Str"+ this.blockAreaMode+ "String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Toggles the user's area mode
 */
void toggleAreaMode(){
  if (this.blockAreaMode == true) {
    this.disableAreaMode();
    this.fillOnce=false;
    this.clearOnce=false;
    this.singleClearMode=false;
    this.singleFillMode=false;
    this.singleClearMode=false;
    this.singleFillMode=false;
    this.clearOnce=false;
    this.fillOnce=false;
    player.sendMessage(ChatColor.DARK_AQUA + "String_Node_Str");
  }
 else {
    this.blockAreaMode=true;
    player.sendMessage(ChatColor.DARK_AQUA + "String_Node_Str");
  }
  if (plugin.debug)   log.info("String_Node_Str" + player.getName() + "String_Node_Str"+ this.blockAreaMode+ "String_Node_Str");
}
Program: 46574
Project: 46574
Buggy source:
public String toString(){
  String ret=getName();
  if (genericsTypes != null) {
    ret+="String_Node_Str";
    for (int i=0; i < genericsTypes.length; i++) {
      if (i != 0)       ret+="String_Node_Str";
      ret+=genericsTypes[i];
    }
    ret+="String_Node_Str";
  }
  if (redirect != null) {
    ret+="String_Node_Str" + redirect().toString();
  }
  return ret;
}

Fixed version (ground truth):
public String toString(){
  String ret=getName();
  if (genericsTypes != null) {
    ret+="String_Node_Str";
    for (int i=0; i < genericsTypes.length; i++) {
      if (i != 0)       ret+="String_Node_Str";
      GenericsType genericsType=genericsTypes[i];
      ret+=genericTypeAsString(genericsType);
    }
    ret+="String_Node_Str";
  }
  if (redirect != null) {
    ret+="String_Node_Str" + redirect().toString();
  }
  return ret;
}
Program: 46575
Project: 46575
Buggy source:
/** 
 * Creates a statement body silimar to: <code>this.fireVetoableChange("field", field, field = value)</code>
 * @param propertyNode           the field node for the property
 * @param fieldExpression a field expression for setting the property value
 * @return the created statement
 */
protected Statement createConstrainedStatement(PropertyNode propertyNode,Expression fieldExpression){
  return new ExpressionStatement(new MethodCallExpression(VariableExpression.THIS_EXPRESSION,"String_Node_Str",new ArgumentListExpression(new Expression[]{new ConstantExpression(propertyNode.getName()),fieldExpression,new VariableExpression("String_Node_Str")})));
}

Fixed version (ground truth):
/** 
 * Creates a statement body similar to: <code>this.fireVetoableChange("field", field, field = value)</code>
 * @param propertyNode           the field node for the property
 * @param fieldExpression a field expression for setting the property value
 * @return the created statement
 */
protected Statement createConstrainedStatement(PropertyNode propertyNode,Expression fieldExpression){
  return new ExpressionStatement(new MethodCallExpression(VariableExpression.THIS_EXPRESSION,"String_Node_Str",new ArgumentListExpression(new Expression[]{new ConstantExpression(propertyNode.getName()),fieldExpression,new VariableExpression("String_Node_Str")})));
}
Program: 46577
Project: 46577
Buggy source:
/** 
 * adds a MetaMethod to this class. WARNING: this method will not do the neccessary steps for multimethod logic and using this method doesn't mean, that a method added here is replacing another method from a parent class completely. These steps are usually done by initalize, which means if you need these steps, you have to add the method before running initialize the first time.
 * @param method the MetaMethod
 * @see #initialize()
 */
public void addMetaMethod(MetaMethod method){
  if (isInitialized()) {
    throw new RuntimeException("String_Node_Str" + method);
  }
  final CachedClass declaringClass=method.getDeclaringClass();
  addMetaMethodToIndex(method,metaMethodIndex.getHeader(declaringClass.getTheClass()));
}

Fixed version (ground truth):
/** 
 * adds a MetaMethod to this class. WARNING: this method will not do the neccessary steps for multimethod logic and using this method doesn't mean, that a method added here is replacing another method from a parent class completely. These steps are usually done by initialize, which means if you need these steps, you have to add the method before running initialize the first time.
 * @param method the MetaMethod
 * @see #initialize()
 */
public void addMetaMethod(MetaMethod method){
  if (isInitialized()) {
    throw new RuntimeException("String_Node_Str" + method);
  }
  final CachedClass declaringClass=method.getDeclaringClass();
  addMetaMethodToIndex(method,metaMethodIndex.getHeader(declaringClass.getTheClass()));
}