nus-yam/ex-repair huggingface dataset:
Program: 153609
Project: 153609
Buggy source:
/** 
 * Starts the workflow process for accepting the social connection between two users. 
 * @param fromUserKey the source user key
 * @param toUserKey the target user key
 * @param connectionType the connection type
 * @throws RepositoryException in case of an error
 */
public void requestSocialConnection(String fromUserKey,String toUserKey,String connectionType) throws RepositoryException {
  final JCRUser from=getJCRUserFromUserKey(fromUserKey);
  if (from == null) {
    throw new IllegalArgumentException("String_Node_Str" + fromUserKey);
  }
  final Map<String,Object> args=new HashMap<String,Object>();
  args.put("String_Node_Str",from.getUsername());
  args.put("String_Node_Str",fromUserKey);
  args.put("String_Node_Str",toUserKey);
  args.put("String_Node_Str",connectionType);
  List<WorkflowVariable> values=new ArrayList<WorkflowVariable>(1);
  values.add(new WorkflowVariable(from.getUsername(),1));
  args.put("String_Node_Str",values);
  JCRTemplate.getInstance().doExecuteWithSystemSession(from.getUsername(),null,Locale.ENGLISH,new JCRCallback<Boolean>(){
    public Boolean doInJCR(    JCRSessionWrapper session) throws RepositoryException {
      workflowService.startProcess(from.getNode(session),"String_Node_Str","String_Node_Str",args);
      return true;
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Starts the workflow process for accepting the social connection between two users. 
 * @param fromUserKey the source user key
 * @param toUserKey the target user key
 * @param connectionType the connection type
 * @throws RepositoryException in case of an error
 */
public void requestSocialConnection(String fromUserKey,String toUserKey,String connectionType) throws RepositoryException {
  final JCRUser from=getJCRUserFromUserKey(fromUserKey);
  if (from == null) {
    throw new IllegalArgumentException("String_Node_Str" + fromUserKey);
  }
  final Map<String,Object> args=new HashMap<String,Object>();
  args.put("String_Node_Str",from.getUsername());
  args.put("String_Node_Str",fromUserKey);
  args.put("String_Node_Str",toUserKey);
  args.put("String_Node_Str",connectionType);
  List<WorkflowVariable> values=new ArrayList<WorkflowVariable>(1);
  values.add(new WorkflowVariable(from.getUsername(),1));
  args.put("String_Node_Str",values);
  JCRTemplate.getInstance().doExecuteWithSystemSession(from.getUsername(),null,Locale.ENGLISH,new JCRCallback<Boolean>(){
    public Boolean doInJCR(    JCRSessionWrapper session) throws RepositoryException {
      workflowService.startProcess(Arrays.asList(from.getNode(session).getIdentifier()),session,"String_Node_Str","String_Node_Str",args,null);
      return true;
    }
  }
);
}
Program: 153610
Project: 153610
Buggy source:
public void keyPressed(KeyEvent e){
  System.out.println("String_Node_Str" + e.getKeyCode());
  System.out.println(e.getModifiersEx());
  System.out.println(e.isShiftDown());
}

Fixed version (ground truth):
public void keyPressed(KeyEvent e){
  int key=e.getKeyCode();
  if (key == KeyEvent.VK_0) {
    frame.add(new SamplePanel());
  }
}
Program: 153611
Project: 153611
Buggy source:
public void keyPressed(KeyEvent e){
  p.keyPressed(e);
}

Fixed version (ground truth):
public void keyPressed(KeyEvent e){
  p.keyPressed(e);
  System.out.println("String_Node_Str");
}
Program: 153612
Project: 153612
Buggy source:
public SamplePanel(){
  p=new Player("String_Node_Str");
  addKeyListener(new AL());
  setFocusable(true);
  ImageIcon i=new ImageIcon("String_Node_Str");
  img=i.getImage();
  time=new Timer(5,this);
  time.start();
}

Fixed version (ground truth):
public SamplePanel(){
  p=new Player("String_Node_Str");
  addKeyListener(new AL());
  setFocusable(true);
  setVisible(true);
  ImageIcon i=new ImageIcon("String_Node_Str");
  img=i.getImage();
  time=new Timer(5,this);
  time.start();
}
Program: 153613
Project: 153613
Buggy source:
public void move(){
  x+=dx;
}

Fixed version (ground truth):
public void move(){
  x+=dx;
  y+=dy;
}
Program: 153614
Project: 153614
Buggy source:
public void keyPressed(KeyEvent e){
  int key=e.getKeyCode();
  if (key == KeyEvent.VK_LEFT)   dx=-1;
 else   if (key == KeyEvent.VK_RIGHT)   dx=1;
}

Fixed version (ground truth):
public void keyPressed(KeyEvent e){
  int key=e.getKeyCode();
  if (key == KeyEvent.VK_LEFT)   dx=-1;
 else   if (key == KeyEvent.VK_RIGHT)   dx=1;
 else   if (key == KeyEvent.VK_UP)   dy=-1;
 else   if (key == KeyEvent.VK_DOWN)   dy=1;
}
Program: 153615
Project: 153615
Buggy source:
public void keyReleased(KeyEvent e){
  int key=e.getKeyCode();
  if (key == KeyEvent.VK_LEFT)   dx=0;
 else   if (key == KeyEvent.VK_RIGHT)   dx=0;
}

Fixed version (ground truth):
public void keyReleased(KeyEvent e){
  int key=e.getKeyCode();
  if (key == KeyEvent.VK_LEFT)   dx=0;
 else   if (key == KeyEvent.VK_RIGHT)   dx=0;
 else   if (key == KeyEvent.VK_UP)   dy=0;
 else   if (key == KeyEvent.VK_DOWN)   dy=0;
}
Program: 153616
Project: 153616
Buggy source:
public void keyPressed(KeyEvent e){
  int key=e.getKeyCode();
  if (key == KeyEvent.VK_0) {
    frame.add(new SamplePanel());
  }
}

Fixed version (ground truth):
public void keyPressed(KeyEvent e){
  int key=e.getKeyCode();
  if (key == KeyEvent.VK_0) {
    SamplePanel sp=new SamplePanel();
    frame.getContentPane().add(sp);
    sp.requestFocusInWindow();
    frame.setVisible(true);
  }
}
Program: 153617
Project: 153617
Buggy source:
public void actionPerformed(ActionEvent e){
  System.out.println("String_Node_Str" + e.getActionCommand());
  if ("String_Node_Str".equalsIgnoreCase(e.getActionCommand())) {
    if (game == null)     return;
    save(game);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(e.getActionCommand())) {
    if (game != null) {
    }
    game=load();
  }
 else   if ("String_Node_Str".equalsIgnoreCase(e.getActionCommand())) {
    game=new Game();
    commandMenu.setEnabled(true);
    gameMenuItems[MENU_SAVE].setEnabled(true);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(e.getActionCommand())) {
    Object[] options={"String_Node_Str","String_Node_Str","String_Node_Str"};
    int n=JOptionPane.showOptionDialog(frame,"String_Node_Str","String_Node_Str",JOptionPane.OK_OPTION,JOptionPane.WARNING_MESSAGE,null,options,options[0]);
    if (n == 0) {
      save(game);
      System.exit(0);
    }
 else     if (n == 1)     System.exit(0);
  }
}

Fixed version (ground truth):
public void actionPerformed(ActionEvent e){
  if ("String_Node_Str".equalsIgnoreCase(e.getActionCommand())) {
    if (game == null)     return;
    save(game);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(e.getActionCommand())) {
    if (game != null) {
    }
    game=load();
  }
 else   if ("String_Node_Str".equalsIgnoreCase(e.getActionCommand())) {
    game=new Game();
    commandMenu.setEnabled(true);
    gameMenuItems[MENU_SAVE].setEnabled(true);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(e.getActionCommand())) {
    Object[] options={"String_Node_Str","String_Node_Str","String_Node_Str"};
    int n=JOptionPane.showOptionDialog(frame,"String_Node_Str","String_Node_Str",JOptionPane.OK_OPTION,JOptionPane.WARNING_MESSAGE,null,options,options[0]);
    if (n == 0) {
      save(game);
      System.exit(0);
    }
 else     if (n == 1)     System.exit(0);
  }
}
Program: 153618
Project: 153618
Buggy source:
public void mouseClicked(MouseEvent e){
  System.out.println("String_Node_Str" + e.getComponent().getName());
}

Fixed version (ground truth):
public void mouseClicked(MouseEvent e){
}
Program: 153619
Project: 153619
Buggy source:
public void actionPerformed(ActionEvent e){
  System.out.println("String_Node_Str" + e.getActionCommand());
  if ("String_Node_Str".equalsIgnoreCase(e.getActionCommand())) {
    if (game == null)     return;
    save(game);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(e.getActionCommand())) {
    if (game != null) {
      System.out.println("String_Node_Str");
    }
    game=load();
  }
 else   if ("String_Node_Str".equalsIgnoreCase(e.getActionCommand())) {
    game=new Game();
    commandMenu.setEnabled(true);
    gameMenuItems[MENU_SAVE].setEnabled(true);
    game.testInit("String_Node_Str",125);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(e.getActionCommand())) {
    System.exit(0);
  }
}

Fixed version (ground truth):
public void actionPerformed(ActionEvent e){
  System.out.println("String_Node_Str" + e.getActionCommand());
  if ("String_Node_Str".equalsIgnoreCase(e.getActionCommand())) {
    if (game == null)     return;
    save(game);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(e.getActionCommand())) {
    if (game != null) {
      System.out.println("String_Node_Str");
    }
    game=load();
  }
 else   if ("String_Node_Str".equalsIgnoreCase(e.getActionCommand())) {
    game=new Game();
    commandMenu.setEnabled(true);
    gameMenuItems[MENU_SAVE].setEnabled(true);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(e.getActionCommand())) {
    System.exit(0);
  }
}
Program: 153620
Project: 153620
Buggy source:
public Image(int width,int height){
  this(width,height,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * create gray image from signed int spread to gray 0-255
 */
public Image(short[][] shortimage){
  Image imgSpreaded=linearSpreadShort(shortimage);
  this.image=imgSpreaded.getImage();
}
Program: 153621
Project: 153621
Buggy source:
public static int[][] compute(Image image){
}

Fixed version (ground truth):
public static int[][] compute(Image image){
  int w=image.width();
  int h=image.height();
  int[][] imgIntegral=new int[w][h];
  int integral=0;
  int lx, ly, lxy;
  for (int i=0; i < w; i++)   for (int j=0; j < h; j++) {
    lx=i > 0 ? imgIntegral[i - 1][j] : 0;
    ly=j > 0 ? imgIntegral[i][j - 1] : 0;
    lxy=i > 0 && j > 0 ? imgIntegral[i - 1][j - 1] : 0;
    imgIntegral[i][j]=image.getGray(i,j) + lx + ly - lxy;
  }
  return imgIntegral;
}
Program: 153622
Project: 153622
Buggy source:
public static short[][] max(short[][] image,int windowsize){
  int w=image.width();
  int h=image.height();
  int[][] imgMax=new int[w][h];
  short max;
  short val;
  for (int i=0; i < w; i++)   for (int j=0; j < h; j++) {
    max=Short.MIN_VALUE;
    Neigborhood neigh=new Neighborhood(Point(i,j),windowsize);
    for (    Point p : neigh) {
      val=(i >= 0 && j >= 0 && i < w && j < h) ? image[p.getX()][p.getY()] : Short.MIN_VALUE;
      if (val > max)       max=val;
    }
    imgMax[i][j]=max;
  }
}

Fixed version (ground truth):
public static short[][] max(short[][] image,int windowsize){
  int w=image.length;
  int h=image[0].length;
  short[][] imgMax=new short[w][h];
  short max;
  short val;
  for (int i=0; i < w; i++)   for (int j=0; j < h; j++) {
    max=Short.MIN_VALUE;
    Neighborhood neigh=new Neighborhood(new Point(i,j),windowsize);
    for (    Point p : neigh) {
      val=(i >= 0 && j >= 0 && i < w && j < h) ? image[p.getX()][p.getY()] : Short.MIN_VALUE;
      if (val > max)       max=val;
    }
    imgMax[i][j]=max;
  }
  return imgMax;
}
Program: 153623
Project: 153623
Buggy source:
public static void main(String[] args){
  Image original=new Image(args[0]);
  Image sobelx=Convolution.sobel(original,0);
  Image sobely=Convolution.sobel(original,1);
  Painter painterOriginal=new Painter("String_Node_Str",original);
  Painter painterSobelX=new Painter("String_Node_Str",sobelx);
  Painter painterSobelY=new Painter("String_Node_Str",sobely);
}

Fixed version (ground truth):
public static void main(String[] args){
  Image original=new Image(args[0]);
  short[][] sobelx=Convolution.sobel(original,0);
  short[][] sobely=Convolution.sobel(original,1);
  Painter painterOriginal=new Painter("String_Node_Str",original);
  Painter painterSobelX=new Painter("String_Node_Str",new Image(sobelx));
  Painter painterSobelY=new Painter("String_Node_Str",new Image(sobely));
}
Program: 153624
Project: 153624
Buggy source:
public Color(int color){
  this(fromInt(color).channels);
}

Fixed version (ground truth):
public Color(int gray){
  this.channels=new int[3];
  this.channels[0]=gray;
  this.channels[1]=gray;
  this.channels[2]=gray;
}
Program: 153625
Project: 153625
Buggy source:
static public Color fromInt(int rgb){
  int c1, c2, c3, reminder;
  c1=rgb / 0x00010000;
  reminder=rgb % 0x00010000;
  c2=reminder / 0x00000100;
  reminder=reminder % 0x00000100;
  c3=reminder;
  return new Color(c1,c2,c3);
}

Fixed version (ground truth):
static public Color fromInt(int rgb){
  int red=(rgb >> 16) & 0xFF;
  int green=(rgb >> 8) & 0xFF;
  int blue=rgb & 0xFF;
  return new Color(red,green,blue);
}
Program: 153627
Project: 153627
Buggy source:
public ActionResult doExecute(HttpServletRequest req,RenderContext renderContext,Resource resource,JCRSessionWrapper session,Map<String,List<String>> parameters,URLResolver urlResolver) throws Exception {
  JCRSessionWrapper jcrSessionWrapper=resource.getNode().getSession();
  JCRNodeWrapper node=resource.getNode();
  if (!node.isNodeType("String_Node_Str")) {
    node.checkout();
    node.addMixin("String_Node_Str");
    jcrSessionWrapper.save();
    logger.info("String_Node_Str" + node.getPath());
  }
  long topicnbOfViews=node.getProperty("String_Node_Str").getLong();
  node.setProperty("String_Node_Str",++topicnbOfViews);
  logger.info("String_Node_Str" + node.getPath() + "String_Node_Str"+ topicnbOfViews);
  jcrSessionWrapper.save();
  return new ActionResult(HttpServletResponse.SC_OK,node.getPath(),Render.serializeNodeToJSON(node));
}

Fixed version (ground truth):
public ActionResult doExecute(HttpServletRequest req,RenderContext renderContext,Resource resource,JCRSessionWrapper session,Map<String,List<String>> parameters,URLResolver urlResolver) throws Exception {
  JCRSessionWrapper jcrSessionWrapper=resource.getNode().getSession();
  JCRNodeWrapper node=resource.getNode();
  if (!node.isNodeType("String_Node_Str")) {
    node.checkout();
    node.addMixin("String_Node_Str");
    node.getRealNode().getSession().save();
    logger.info("String_Node_Str" + node.getPath());
  }
  long topicnbOfViews=node.getProperty("String_Node_Str").getLong();
  node.setProperty("String_Node_Str",++topicnbOfViews);
  logger.info("String_Node_Str" + node.getPath() + "String_Node_Str"+ topicnbOfViews);
  node.getRealNode().getSession().save();
  return new ActionResult(HttpServletResponse.SC_OK,node.getPath(),Render.serializeNodeToJSON(node));
}
Program: 153628
Project: 153628
Buggy source:
public ActionResult doExecute(HttpServletRequest req,RenderContext renderContext,Resource resource,JCRSessionWrapper session,Map<String,List<String>> parameters,URLResolver urlResolver) throws Exception {
  JCRSessionWrapper jcrSessionWrapper=resource.getNode().getSession();
  JCRNodeWrapper node=resource.getNode();
  if (!node.isNodeType("String_Node_Str")) {
    node.checkout();
    node.addMixin("String_Node_Str");
    node.getRealNode().getSession().save();
    logger.info("String_Node_Str" + node.getPath());
  }
  long topicnbOfViews=node.getProperty("String_Node_Str").getLong();
  node.setProperty("String_Node_Str",++topicnbOfViews);
  logger.info("String_Node_Str" + node.getPath() + "String_Node_Str"+ topicnbOfViews);
  node.getRealNode().getSession().save();
  return new ActionResult(HttpServletResponse.SC_OK,node.getPath(),Render.serializeNodeToJSON(node));
}

Fixed version (ground truth):
public ActionResult doExecute(HttpServletRequest req,RenderContext renderContext,Resource resource,JCRSessionWrapper session,Map<String,List<String>> parameters,URLResolver urlResolver) throws Exception {
  JCRSessionWrapper jcrSessionWrapper=resource.getNode().getSession();
  JCRNodeWrapper node=resource.getNode();
  if (!node.isNodeType("String_Node_Str")) {
    node.checkout();
    node.addMixin("String_Node_Str");
    jcrSessionWrapper.save();
    logger.info("String_Node_Str" + node.getPath());
  }
  long topicnbOfViews=node.getProperty("String_Node_Str").getLong();
  node.setProperty("String_Node_Str",++topicnbOfViews);
  logger.info("String_Node_Str" + node.getPath() + "String_Node_Str"+ topicnbOfViews);
  jcrSessionWrapper.save();
  return new ActionResult(HttpServletResponse.SC_OK,node.getPath(),Render.serializeNodeToJSON(node));
}
Program: 153629
Project: 153629
Buggy source:
@Override public ActionResult doExecute(HttpServletRequest req,RenderContext renderContext,Resource resource,JCRSessionWrapper session,Map<String,List<String>> parameters,URLResolver urlResolver) throws Exception {
  JCRSessionWrapper jcrSessionWrapper=resource.getNode().getSession();
  JCRNodeWrapper node=resource.getNode();
  if (!node.isNodeType("String_Node_Str")) {
    String topicTitle=parameters.get("String_Node_Str").get(0);
    node.checkout();
    node=node.addNode(JCRContentUtils.generateNodeName(topicTitle,32),"String_Node_Str");
    node.setProperty("String_Node_Str",topicTitle);
  }
  JCRNodeWrapper newNode=createNode(req,parameters,jcrSessionWrapper.getNode(node.getPath()),"String_Node_Str","String_Node_Str");
  if (!session.getUser().getUsername().equals(Constants.GUEST_USERNAME)) {
    List<String> roles=Arrays.asList("String_Node_Str");
    newNode.grantRoles("String_Node_Str" + session.getUser().getUsername(),new HashSet<String>(roles));
  }
  jcrSessionWrapper.save();
  parameters.remove(Render.REDIRECT_TO);
  return new ActionResult(HttpServletResponse.SC_OK,node.getPath(),Render.serializeNodeToJSON(newNode));
}

Fixed version (ground truth):
@Override public ActionResult doExecute(HttpServletRequest req,RenderContext renderContext,Resource resource,JCRSessionWrapper session,Map<String,List<String>> parameters,URLResolver urlResolver) throws Exception {
  JCRSessionWrapper jcrSessionWrapper=resource.getNode().getSession();
  JCRNodeWrapper node=resource.getNode();
  if (!node.isNodeType("String_Node_Str")) {
    String topicTitle=parameters.get("String_Node_Str").get(0);
    node.checkout();
    node=node.addNode(JCRContentUtils.generateNodeName(topicTitle,32),"String_Node_Str");
    node.setProperty("String_Node_Str",topicTitle);
  }
  JCRNodeWrapper newNode=createNode(req,parameters,jcrSessionWrapper.getNode(node.getPath()),"String_Node_Str","String_Node_Str",false);
  if (!session.getUser().getUsername().equals(Constants.GUEST_USERNAME)) {
    List<String> roles=Arrays.asList("String_Node_Str");
    newNode.grantRoles("String_Node_Str" + session.getUser().getUsername(),new HashSet<String>(roles));
  }
  jcrSessionWrapper.save();
  parameters.remove(Render.REDIRECT_TO);
  return new ActionResult(HttpServletResponse.SC_OK,node.getPath(),Render.serializeNodeToJSON(newNode));
}
Program: 153631
Project: 153631
Buggy source:
/** 
 * Opens a FOREACH scope.
 */
private void openForEach(){
  this.addScope(new Scope(this.scope,ScopeType.FOREACH));
  this.tokenizer.next();
  this.checkToken(Token.NAME);
  Variable key=null, val=this.scope.findVariable(new Variable(),this.tokenizer.string);
  this.needSetVariable(val);
  this.tokenizer.next();
  if (this.tokenizer.token == Token.COMMA) {
    this.tokenizer.next();
    this.checkToken(Token.NAME);
    key=val;
    val=this.scope.findVariable(new Variable(),this.tokenizer.string);
    this.needSetVariable(val);
    this.tokenizer.next();
  }
  this.checkReserved(ReservedWord.IN);
  this.tokenizer.next();
  this.checkToken(Token.NAME);
  final Variable map=this.scope.findVariable(new Variable(),this.tokenizer.string);
  this.needGetVariable(map);
  this.writeGetVariable(map);
  this.tokenizer.next();
  this.checkReserved(ReservedWord.DO);
  this.tokenizer.next();
  this.block.callRuntime("String_Node_Str");
  this.scope.startPc=this.block.getPc();
  this.block.callRuntime("String_Node_Str","String_Node_Str");
  this.scope.addBreak(this.block.writeJmp(JvmOp.IFEQ,0));
  this.writeSetVariable(val);
  if (key != null)   this.writeSetVariable(key);
 else   this.block.callRuntime("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Opens a FOREACH scope.
 */
private void openForEach(){
  this.addScope(new Scope(this.scope,ScopeType.FOREACH));
  this.tokenizer.next();
  this.checkToken(Token.NAME);
  Variable key=null, val=this.scope.findVariable(new Variable(),this.tokenizer.string);
  this.needSetVariable(val);
  this.tokenizer.next();
  if (this.tokenizer.token == Token.COMMA) {
    this.tokenizer.next();
    this.checkToken(Token.NAME);
    key=val;
    val=this.scope.findVariable(new Variable(),this.tokenizer.string);
    this.needSetVariable(val);
    this.tokenizer.next();
  }
  this.checkReserved(ReservedWord.IN);
  this.tokenizer.next();
  if (this.tokenizer.token == Token.RESERVED && this.tokenizer.reserved == ReservedWord.THIS) {
    final Scope s=this.scope.findFunctionScope();
    if (s == null || !s.isOop) {
      throw new WeelException(this.tokenizer.error("String_Node_Str"));
    }
    this.block.callRuntime("String_Node_Str",0);
  }
 else {
    this.checkToken(Token.NAME);
    final Variable map=this.scope.findVariable(new Variable(),this.tokenizer.string);
    this.needGetVariable(map);
    this.writeGetVariable(map);
  }
  this.tokenizer.next();
  this.checkReserved(ReservedWord.DO);
  this.tokenizer.next();
  this.block.callRuntime("String_Node_Str");
  this.scope.startPc=this.block.getPc();
  this.block.callRuntime("String_Node_Str","String_Node_Str");
  this.scope.addBreak(this.block.writeJmp(JvmOp.IFEQ,0));
  this.writeSetVariable(val);
  if (key != null)   this.writeSetVariable(key);
 else   this.block.callRuntime("String_Node_Str");
}
Program: 153632
Project: 153632
Buggy source:
/** 
 * Parses a Weel assert.
 */
private void parseAssert(){
  CodeBlock old=this.block;
  if (!this.debugMode) {
    final JvmClassWriter temp=new JvmClassWriter("String_Node_Str");
    this.block=this.scope.block=new CodeBlock(temp.createMethod("String_Node_Str","String_Node_Str"));
  }
  int paramc=0;
  while (this.tokenizer.token != Token.BRACE_CLOSE) {
    paramc++;
    this.parseExpression();
    if (this.tokenizer.token == Token.BRACE_CLOSE) {
      break;
    }
    if (this.tokenizer.token == Token.COMMA) {
      this.tokenizer.next();
      continue;
    }
    this.syntaxError();
  }
  if (paramc != 1) {
    throw new WeelException(this.tokenizer.error("String_Node_Str"));
  }
  this.tokenizer.next();
  if (!this.debugMode) {
    this.block=this.scope.block=old;
  }
 else {
    this.block.code.add(JvmOp.ALOAD_0);
    this.block.ldcStr(this.tokenizer.error("String_Node_Str"));
    this.block.code.add(JvmOp.INVOKEVIRTUAL);
    this.block.code.addShort(this.classWriter.addMethodRefConstant("String_Node_Str","String_Node_Str","String_Node_Str"));
    this.block.pop();
  }
}

Fixed version (ground truth):
/** 
 * Parses a Weel assert.
 */
private void parseAssert(){
  CodeBlock old=this.block;
  if (!this.debugMode) {
    final JvmClassWriter temp=new JvmClassWriter("String_Node_Str");
    this.block=this.scope.block=new CodeBlock(temp.createMethod("String_Node_Str","String_Node_Str"));
  }
  this.parseExpression();
  String message=null;
  if (this.tokenizer.token == Token.COMMA) {
    this.tokenizer.next();
    this.checkToken(Token.STRING);
    message=this.tokenizer.string;
    this.tokenizer.next();
  }
  this.checkToken(Token.BRACE_CLOSE);
  this.tokenizer.next();
  if (!this.debugMode) {
    this.block=this.scope.block=old;
  }
 else {
    this.block.code.add(JvmOp.ALOAD_0);
    if (message != null)     this.block.ldcStr(this.tokenizer.error("String_Node_Str",message));
 else     this.block.ldcStr(this.tokenizer.error("String_Node_Str"));
    this.block.code.add(JvmOp.INVOKEVIRTUAL);
    this.block.code.addShort(this.classWriter.addMethodRefConstant("String_Node_Str","String_Node_Str","String_Node_Str"));
    this.block.pop();
  }
}
Program: 153634
Project: 153634
Buggy source:
/** 
 * Checks if the current expression continues with a token that indicates that it needs a return value. Only used in variables and function parsing for non-first expressions.
 * @return <code>true</code> if so.
 */
private boolean wouldNeedReturnValue(){
switch (this.tokenizer.token) {
case BRACE_OPEN:
case BRACKET_OPEN:
case DOT:
case ARROW:
case DOUBLE_COLON:
case ASSIGN:
case ASSIGN_ADD:
case ASSIGN_DIV:
case ASSIGN_AND:
case ASSIGN_MODULO:
case ASSIGN_MUL:
case ASSIGN_OR:
case ASSIGN_SUB:
case ASSIGN_XOR:
case ASSIGN_STRCAT:
    return true;
default :
  return false;
}
}

Fixed version (ground truth):
/** 
 * Checks if the current expression continues with a token that indicates that it needs a return value. Only used in variables and function parsing for non-first expressions.
 * @return <code>true</code> if so.
 */
private boolean wouldNeedReturnValue(){
switch (this.tokenizer.token) {
case BRACE_OPEN:
case BRACKET_OPEN:
case DOT:
case ARROW:
case DOUBLE_COLON:
case ASSIGN:
case ASSIGN_ADD:
case ASSIGN_DIV:
case ASSIGN_AND:
case ASSIGN_MODULO:
case ASSIGN_MUL:
case ASSIGN_OR:
case ASSIGN_SUB:
case ASSIGN_XOR:
case ASSIGN_STRCAT:
case ASSIGN_MAPCAT:
    return true;
default :
  return false;
}
}
Program: 153636
Project: 153636
Buggy source:
/** 
 * Initializes this compiler.
 */
private void initialize(){
  this.classWriter=new JvmClassWriter("String_Node_Str" + classCounter++);
  this.weel.scriptClasses.add(this.classWriter.className);
  final Scope s=new Scope(this.weel,ScopeType.STATIC);
  s.block=new CodeBlock(this.classWriter.createMethod("String_Node_Str","String_Node_Str"));
  this.addScope(s);
}

Fixed version (ground truth):
/** 
 * Initializes this compiler.
 */
private void initialize(){
  this.classWriter=new JvmClassWriter("String_Node_Str" + Weel.scriptCounter.getAndIncrement());
  this.weel.scriptClasses.add(this.classWriter.className);
  final Scope s=new Scope(this.weel,ScopeType.STATIC);
  s.block=new CodeBlock(this.classWriter.createMethod("String_Node_Str","String_Node_Str"));
  this.addScope(s);
}
Program: 153637
Project: 153637
Buggy source:
@WeelMethod() public final static void ctor(final ValueMap thiz){
  WeelOop.setInstance(thiz,new StringBuilder());
}

Fixed version (ground truth):
@WeelMethod() public final static void ctor(final ValueMap thiz,final int size){
  WeelOop.setInstance(thiz,new StringBuilder(size));
}
Program: 153638
Project: 153638
Buggy source:
public static void main(String[] args){
  try {
    final Weel weel=new Weel();
    weel.importFunctions(Main.class);
    weel.compile(Main.class.getResourceAsStream("String_Node_Str"),"String_Node_Str");
    weel.compile(Main.class.getResourceAsStream("String_Node_Str"),"String_Node_Str");
    for (    WeelLoader.ClassData cd : weel.classLoader.classData) {
      FileOutputStream fos=new FileOutputStream("String_Node_Str" + cd.name.substring(cd.name.lastIndexOf('.') + 1) + "String_Node_Str");
      fos.write(cd.code);
      fos.close();
    }
    weel.runStatic();
    if (weel.getRuntime().getStackPointer() != -1)     System.err.println("String_Node_Str" + weel.getRuntime().getStackPointer() + "String_Node_Str");
  }
 catch (  Exception e) {
    throw (e instanceof WeelException) ? (WeelException)e : new WeelException(e);
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  try {
    final Weel weel=new Weel();
    weel.setDebugMode(false);
    weel.importFunctions(Main.class);
    weel.compileResource("String_Node_Str");
    weel.compileResource("String_Node_Str");
    for (    WeelLoader.ClassData cd : weel.classLoader.classData) {
      FileOutputStream fos=new FileOutputStream("String_Node_Str" + cd.name.substring(cd.name.lastIndexOf('.') + 1) + "String_Node_Str");
      fos.write(cd.code);
      fos.close();
    }
    weel.runStatic();
    if (weel.getRuntime().getStackPointer() != -1)     System.err.println("String_Node_Str" + weel.getRuntime().getStackPointer() + "String_Node_Str");
  }
 catch (  Exception e) {
    throw (e instanceof WeelException) ? (WeelException)e : new WeelException(e);
  }
}
Program: 153640
Project: 153640
Buggy source:
/** 
 * Performs a special call. <p> <code>..., value, [arguments] &rArr; ..., [return value]</code> </p>
 * @param name The name of the function.
 * @param args The number of arguments.
 * @param shouldReturn Flags indicating that we need a return value.
 */
public void specialCall(final String name,final int args,final boolean shouldReturn){
  final TypeFunctions funcs=this.typeFunctions[this.stack[this.sp - args].type.ordinal()];
  if (funcs == null) {
    throw new WeelException("String_Node_Str" + this.stack[this.sp - args].type);
  }
  final WeelFunction func=funcs.findFunction(name);
  if (func == null) {
    throw new WeelException("String_Node_Str" + name.substring(0,name.lastIndexOf('#')) + "String_Node_Str"+ args+ "String_Node_Str");
  }
  func.invoke(this);
  if (func.returnsValue && !shouldReturn) {
    this.sp--;
  }
 else   if (!func.returnsValue && shouldReturn) {
    this.stack[++this.sp].setNull();
  }
}

Fixed version (ground truth):
/** 
 * Performs a special call. <p> <code>..., value, [arguments] &rArr; ..., [return value]</code> </p>
 * @param name The name of the function.
 * @param args The number of arguments.
 * @param shouldReturn Flags indicating that we need a return value.
 */
public void specialCall(final String name,final int args,final boolean shouldReturn){
  final TypeFunctions funcs=this.typeFunctions[this.stack[this.sp - args].type.ordinal()];
  final WeelFunction func=funcs.findFunction(name);
  if (func == null) {
    throw new WeelException("String_Node_Str" + name.substring(0,name.lastIndexOf('#')) + "String_Node_Str"+ args+ "String_Node_Str");
  }
  func.invoke(this);
  if (func.returnsValue && !shouldReturn) {
    this.sp--;
  }
 else   if (!func.returnsValue && shouldReturn) {
    this.stack[++this.sp].setNull();
  }
}
Program: 153641
Project: 153641
Buggy source:
/** 
 * Finds a surrounding function scope.
 * @return The function scope or <code>null</code>
 */
Scope findFunctionScope(){
  Scope current=this;
  while (current != null) {
    if (current.block.function != null)     return current;
    current=current.parent;
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Finds a surrounding function scope.
 * @return The function scope or <code>null</code>
 */
Scope findFunctionScope(){
  Scope current=this;
  while (current != null) {
    if (current.type == ScopeType.FUNC || current.type == ScopeType.SUB)     return current;
    current=current.parent;
  }
  return null;
}
Program: 153643
Project: 153643
Buggy source:
public SeekBarMinMax(Context context,int min,int max){
  super(context);
  this.min=min;
  this.setMax(max - min);
}

Fixed version (ground truth):
public SeekBarMinMax(SeekBar seek_bar,int min,int max){
  mySeekBar=seek_bar;
  this.min=min;
  mySeekBar.setMax(max - min);
}
Program: 153644
Project: 153644
Buggy source:
@Override public synchronized void setProgress(int progress){
  super.setProgress(progress - min);
}

Fixed version (ground truth):
public synchronized void setProgress(int progress){
  mySeekBar.setProgress(progress - min);
}
Program: 153645
Project: 153645
Buggy source:
@Override public synchronized int getProgress(){
  return super.getProgress() + min;
}

Fixed version (ground truth):
public synchronized int getProgress(){
  return mySeekBar.getProgress() + min;
}
Program: 153646
Project: 153646
Buggy source:
public Projectile createNewProjectile(String name){
  Projectile projectile=null;
  if (name.equals("String_Node_Str")) {
    name=Helper.getWeightedRandomValue(this.weightedValues);
  }
  if (name.equals("String_Node_Str")) {
    projectile=new Ball(this);
  }
 else   if (name.equals("String_Node_Str")) {
    projectile=new PaddleSpeedPower(this);
  }
}

Fixed version (ground truth):
public Projectile createNewProjectile(String name){
  Projectile projectile=null;
  if (name.equals("String_Node_Str")) {
    name=Helper.getWeightedRandomValue(this.weightedValues);
  }
  if (name.equals("String_Node_Str")) {
    projectile=new Ball(this);
  }
 else   if (name.equals("String_Node_Str")) {
    projectile=new PaddleSpeedPower(this);
  }
 else {
    System.out.println("String_Node_Str");
  }
  return projectile;
}
Program: 153647
Project: 153647
Buggy source:
/** 
 * build Builds a full data tree based on external data.
 * @param path for file stream
 * @postcondition A full tree of recycling data is constructed.
 */
public void build(String dataPath) throws FileNotFoundException {
  try {
    thisNode.setImagePath("String_Node_Str");
    thisNode.setText("String_Node_Str");
    thisNode.setTitle("String_Node_Str");
    children=new RBTree[6];
    RBTreeNode childNode=children[0].getThisNode();
    childNode.setImagePath("String_Node_Str");
    childNode.setText("String_Node_Str");
    childNode.setTitle("String_Node_Str");
    childNode=children[1].getThisNode();
    childNode.setImagePath("String_Node_Str");
    childNode.setText("String_Node_Str");
    childNode.setTitle("String_Node_Str");
    childNode=children[2].getThisNode();
    childNode.setImagePath("String_Node_Str");
    childNode.setText("String_Node_Str");
    childNode.setTitle("String_Node_Str");
    childNode=children[3].getThisNode();
    childNode.setImagePath("String_Node_Str");
    childNode.setText("String_Node_Str");
    childNode.setTitle("String_Node_Str");
    childNode=children[4].getThisNode();
    childNode.setImagePath("String_Node_Str");
    childNode.setText("String_Node_Str");
    childNode.setTitle("String_Node_Str");
    childNode=children[5].getThisNode();
    childNode.setImagePath("String_Node_Str");
    childNode.setText("String_Node_Str");
    childNode.setTitle("String_Node_Str");
  }
 catch (  Exception e) {
  }
}

Fixed version (ground truth):
/** 
 * build Builds a full data tree based on external data.
 * @param path for file stream
 * @postcondition A full tree of recycling data is constructed.
 */
public void build(String dataPath) throws FileNotFoundException {
  try {
    thisNode.setImagePath("String_Node_Str");
    thisNode.setText("String_Node_Str");
    thisNode.setTitle("String_Node_Str");
    children=new RBTree[6];
    for (int i=0; i < children.length; i++) {
      children[i]=new RBTree(this,i);
    }
    RBTreeNode childNode=children[0].getThisNode();
    childNode.setImagePath("String_Node_Str");
    childNode.setText("String_Node_Str");
    childNode.setTitle("String_Node_Str");
    childNode=children[1].getThisNode();
    childNode.setImagePath("String_Node_Str");
    childNode.setText("String_Node_Str");
    childNode.setTitle("String_Node_Str");
    childNode=children[2].getThisNode();
    childNode.setImagePath("String_Node_Str");
    childNode.setText("String_Node_Str");
    childNode.setTitle("String_Node_Str");
    childNode=children[3].getThisNode();
    childNode.setImagePath("String_Node_Str");
    childNode.setText("String_Node_Str");
    childNode.setTitle("String_Node_Str");
    childNode=children[4].getThisNode();
    childNode.setImagePath("String_Node_Str");
    childNode.setText("String_Node_Str");
    childNode.setTitle("String_Node_Str");
    childNode=children[5].getThisNode();
    childNode.setImagePath("String_Node_Str");
    childNode.setText("String_Node_Str");
    childNode.setTitle("String_Node_Str");
  }
 catch (  Exception e) {
  }
}
Program: 153648
Project: 153648
Buggy source:
/** 
 * @see HBaseService#scan(String,String,String,Long,Long,Integer,Integer,Boolean,Integer,String,String)
 */
public Iterable<Result> scan(final String tableName,final String columnFamilyName,final String columnQualifier,final Long timestamp,final Long maxTimestamp,final Integer caching,final boolean cacheBlocks,final int maxVersions,final String startRow,final String stopRow,final int fetchSize){
  return doWithHTable(tableName,new TableCallback<ResultIterable>(){
    public ResultIterable doWithHBaseAdmin(    HTableInterface hTable) throws Exception {
      Scan scan=new Scan();
      if (columnFamilyName != null) {
        if (columnQualifier != null) {
          scan.addColumn(columnFamilyName.getBytes(UTF8),columnQualifier.getBytes(UTF8));
        }
 else {
          scan.addFamily(columnFamilyName.getBytes(UTF8));
        }
      }
      if (timestamp != null) {
        if (maxTimestamp != null) {
          scan.setTimeRange(timestamp,maxTimestamp);
        }
 else {
          scan.setTimeStamp(timestamp);
        }
      }
      if (caching != null) {
        scan.setCaching(caching);
      }
      scan.setCacheBlocks(cacheBlocks);
      scan.setMaxVersions(maxVersions);
      if (startRow != null) {
        scan.setStartRow(startRow.getBytes(UTF8));
      }
      if (stopRow != null) {
        scan.setStopRow(stopRow.getBytes(UTF8));
      }
      return new ResultIterable(scan,fetchSize,hTable);
    }
  }
);
}

Fixed version (ground truth):
/** 
 * @see HBaseService#scan(String,String,String,Long,Long,Integer,Integer,Boolean,Integer,String,String)
 */
public Iterable<Result> scan(final String tableName,final String columnFamilyName,final String columnQualifier,final Long timestamp,final Long maxTimestamp,final Integer caching,final boolean cacheBlocks,final int maxVersions,final String startRow,final String stopRow,final int fetchSize){
  return doWithHTable(tableName,new TableCallback<ResultIterable>(){
    public ResultIterable doWithHBaseAdmin(    HTableInterface hTable) throws Exception {
      Scan scan=new Scan();
      if (columnFamilyName != null) {
        if (columnQualifier != null) {
          scan.addColumn(columnFamilyName.getBytes(UTF8),columnQualifier.getBytes(UTF8));
        }
 else {
          scan.addFamily(columnFamilyName.getBytes(UTF8));
        }
      }
      if (timestamp != null) {
        if (maxTimestamp != null) {
          scan.setTimeRange(timestamp,maxTimestamp);
        }
 else {
          scan.setTimeStamp(timestamp);
        }
      }
      if (caching != null) {
        scan.setCaching(caching);
      }
      scan.setCacheBlocks(cacheBlocks);
      scan.setMaxVersions(maxVersions);
      if (startRow != null) {
        scan.setStartRow(startRow.getBytes(UTF8));
      }
      if (stopRow != null) {
        scan.setStopRow(stopRow.getBytes(UTF8));
      }
      return new ResultIterable(scan,fetchSize,hTable);
    }
  }
,false);
}
Program: 153649
Project: 153649
Buggy source:
/** 
 * Retain and release the   {@link HTable} 
 */
private <T>T doWithHTable(final String tableName,final TableCallback<T> callback){
  Validate.isTrue(StringUtils.isNotBlank(tableName));
  Validate.notNull(callback);
  HTableInterface hTable=null;
  try {
    hTable=createHTable(tableName);
    return callback.doWithHBaseAdmin(hTable);
  }
 catch (  Exception e) {
    throw new HBaseServiceException(e);
  }
 finally {
    if (hTable != null) {
      try {
        hTable.close();
      }
 catch (      IOException e) {
        throw new HBaseServiceException(e);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Retain and release the   {@link HTable} 
 */
private <T>T doWithHTable(final String tableName,final TableCallback<T> callback,boolean closeHtable){
  Validate.isTrue(StringUtils.isNotBlank(tableName));
  Validate.notNull(callback);
  HTableInterface hTable=null;
  try {
    hTable=createHTable(tableName);
    return callback.doWithHBaseAdmin(hTable);
  }
 catch (  Exception e) {
    throw new HBaseServiceException(e);
  }
 finally {
    if (hTable != null) {
      try {
        hTable.close();
      }
 catch (      IOException e) {
        throw new HBaseServiceException(e);
      }
    }
  }
}
Program: 153650
Project: 153650
Buggy source:
@Override protected boolean hasNextPage(ScannerAndResults page){
  return page.getResults().length == fetchSize;
}

Fixed version (ground truth):
@Override protected boolean hasNextPage(ScannerAndResults page){
  boolean hasNextPage=page.getResults().length == fetchSize;
  if (!hasNextPage) {
    closeHTable();
  }
  return hasNextPage;
}
Program: 153653
Project: 153653
Buggy source:
public void processJoin(Player player){
  if (!player.isOnline()) {
    return;
  }
  String name=player.getName();
  j2.irc.processJoin(name);
  j2.ip.processJoin(name);
  j2.warps.processJoin(name);
  j2.damage.processJoin(name);
  j2.jail.processJoin(player);
  this.playerReset(name);
  if (player.getInventory().getHelmet().getTypeId() == Material.FIRE.getId()) {
    player.getInventory().setHelmet(new ItemStack(Material.GRASS));
    player.sendMessage(ChatColor.RED + "String_Node_Str");
  }
  if (j2.maintenance) {
    player.sendMessage(ChatColor.YELLOW + "String_Node_Str");
  }
  try {
    j2.banCoop.processJoin(player);
  }
 catch (  Exception e) {
  }
  for (  String line : j2.motd) {
    player.sendMessage(line);
  }
  if (j2.reallyHasFlag(name,Flag.ADMIN)) {
    int count=this.j2.reports.numReports();
    player.sendMessage(ChatColor.LIGHT_PURPLE + "String_Node_Str" + count+ "String_Node_Str");
  }
  j2.minitrue.processJoin(player);
  if (j2.hasFlag(player,Flag.CONTRIBUTOR)) {
    player.sendMessage(ChatColor.LIGHT_PURPLE + "String_Node_Str" + ChatColor.GOLD+ "String_Node_Str");
    player.sendMessage(ChatColor.LIGHT_PURPLE + "String_Node_Str" + ChatColor.RED+ "String_Node_Str");
  }
}

Fixed version (ground truth):
public void processJoin(Player player){
  if (!player.isOnline()) {
    return;
  }
  String name=player.getName();
  j2.irc.processJoin(name);
  j2.ip.processJoin(name);
  j2.warps.processJoin(name);
  j2.damage.processJoin(name);
  j2.jail.processJoin(player);
  this.playerReset(name);
  if (player.getInventory().getHelmet().getTypeId() == Material.FIRE.getId()) {
    player.getInventory().setHelmet(new ItemStack(Material.GRASS));
    player.sendMessage(ChatColor.RED + "String_Node_Str");
  }
  if (j2.maintenance) {
    player.sendMessage(ChatColor.YELLOW + "String_Node_Str");
  }
  j2.banCoop.processJoin(player);
  for (  String line : j2.motd) {
    player.sendMessage(line);
  }
  if (j2.reallyHasFlag(name,Flag.ADMIN)) {
    int count=this.j2.reports.numReports();
    player.sendMessage(ChatColor.LIGHT_PURPLE + "String_Node_Str" + count+ "String_Node_Str");
  }
  j2.minitrue.processJoin(player);
  if (j2.hasFlag(player,Flag.CONTRIBUTOR)) {
    player.sendMessage(ChatColor.LIGHT_PURPLE + "String_Node_Str" + ChatColor.GOLD+ "String_Node_Str");
    player.sendMessage(ChatColor.LIGHT_PURPLE + "String_Node_Str" + ChatColor.RED+ "String_Node_Str");
  }
}
Program: 153654
Project: 153654
Buggy source:
public void onDisconnect(){
  if (ircman.getJ2().ircEnable) {
    ircman.restart=true;
    ircman.getJ2().ircEnable=false;
    this.dispose();
  }
}

Fixed version (ground truth):
public void onDisconnect(){
  if (irc.getJ2().ircEnable) {
    irc.restart=true;
    irc.getJ2().ircEnable=false;
    this.dispose();
  }
}
Program: 153655
Project: 153655
Buggy source:
public void doMsg(String channel,String sender,String message){
  this.ircman.getJ2().chat.handleIRCChat(sender,message,false,channel);
}

Fixed version (ground truth):
public void doMsg(String channel,String sender,String message){
  this.irc.getJ2().chat.handleIRCChat(sender,message,false,channel);
}
Program: 153656
Project: 153656
Buggy source:
protected void onPrivateMessage(String sender,String login,String hostname,String message){
  if (ircman.ircCommand(hostname,sender,message.split("String_Node_Str"))) {
    sendRawLine("String_Node_Str" + sender + "String_Node_Str");
  }
 else {
    sendRawLine("String_Node_Str" + sender + "String_Node_Str");
  }
}

Fixed version (ground truth):
protected void onPrivateMessage(String sender,String login,String hostname,String message){
  if (irc.ircCommand(hostname,sender,message.split("String_Node_Str"))) {
    sendRawLine("String_Node_Str" + sender + "String_Node_Str");
  }
 else {
    sendRawLine("String_Node_Str" + sender + "String_Node_Str");
  }
}
Program: 153658
Project: 153658
Buggy source:
public void doMeMsg(String channel,String sender,String message){
  this.ircman.getJ2().chat.handleIRCChat(sender,message,true,channel);
}

Fixed version (ground truth):
public void doMeMsg(String channel,String sender,String message){
  this.irc.getJ2().chat.handleIRCChat(sender,message,true,channel);
}
Program: 153659
Project: 153659
Buggy source:
public ircBot(String mah_name,boolean msgenabled,IRC j){
  this.setName(mah_name);
  this.setAutoNickChange(true);
  ircMsg=msgenabled;
  ircman=j;
  this.setMessageDelay(1100);
}

Fixed version (ground truth):
public ircBot(String mah_name,boolean msgenabled,IRC j){
  this.setName(mah_name);
  this.setAutoNickChange(true);
  ircMsg=msgenabled;
  irc=j;
  this.setMessageDelay(1100);
}
Program: 153660
Project: 153660
Buggy source:
public void onInvite(String targetNick,String sourceNick,String sourceLogin,String sourceHostname,String channel){
  if (targetNick.equalsIgnoreCase(this.getNick()) && channel.equalsIgnoreCase(ircman.getJ2().ircAdminChannel)) {
    this.joinChannel(channel);
  }
}

Fixed version (ground truth):
public void onInvite(String targetNick,String sourceNick,String sourceLogin,String sourceHostname,String channel){
  if (targetNick.equalsIgnoreCase(this.getNick()) && channel.equalsIgnoreCase(irc.getJ2().ircAdminChannel)) {
    this.joinChannel(channel);
  }
}
Program: 153661
Project: 153661
Buggy source:
public Player[] getOnlinePlayers(){
  Player[] players=j2.getServer().getOnlinePlayers();
  ArrayList<Player> toreturn=new ArrayList<Player>();
  for (  Player p : players) {
    if (!this.invisible(p)) {
      toreturn.add(p);
    }
  }
  return (Player[])toreturn.toArray();
}

Fixed version (ground truth):
public Player[] getOnlinePlayers(){
  Player[] players=j2.getServer().getOnlinePlayers();
  Player[] toreturn=new Player[players.length - this.numinvis()];
  int cur=0;
  for (  Player p : players) {
    if (!this.invisible(p)) {
      toreturn[cur]=p;
      cur++;
    }
  }
  return toreturn;
}
Program: 153665
Project: 153665
Buggy source:
@Override public void onBlockIgnite(BlockIgniteEvent event){
  if (j2.safemode && !event.getCause().equals(IgniteCause.FLINT_AND_STEEL)) {
    event.setCancelled(true);
  }
}

Fixed version (ground truth):
@Override public void onBlockIgnite(BlockIgniteEvent event){
  if (j2.safemode && !(event.getCause().equals(IgniteCause.FLINT_AND_STEEL))) {
    event.setCancelled(true);
  }
}
Program: 153666
Project: 153666
Buggy source:
@Override public void onEntityDamage(EntityDamageEvent event){
  if (j2.safemode) {
    event.setCancelled(true);
  }
}

Fixed version (ground truth):
@Override public void onEntityDamage(EntityDamageEvent event){
  if (j2.safemode && event.getEntity() != null && event.getEntity() instanceof Player) {
    event.setCancelled(true);
  }
}
Program: 153668
Project: 153668
Buggy source:
public boolean ircCommand(String host,String nick,String[] command){
  return true;
}

Fixed version (ground truth):
public boolean ircCommand(String host,String nick,String[] command){
  if (!j2.ircEnable)   return false;
  int lvl=0;
  String adminName="String_Node_Str";
synchronized (adminsLock) {
    for (    ircAdmin admin : admins) {
      if (admin != null && admin.getHostname().equals(host)) {
        lvl=admin.getLevel();
        adminName=admin.getUsername();
      }
    }
  }
  if (command[0].charAt(0) == '.') {
    command[0]=command[0].substring(1);
  }
  if (lvl == 0 || (lvl == 2 && !ircLevel2(command[0]))) {
    return false;
  }
  String commands=j2.combineSplit(0,command,"String_Node_Str");
  String com=command[0];
  boolean done=false;
  if (com.equalsIgnoreCase("String_Node_Str") && command.length > 2) {
    j2.kickbans.forceKick(command[1],j2.combineSplit(2,command,"String_Node_Str"));
    done=true;
  }
  if (com.equalsIgnoreCase("String_Node_Str") && command.length > 2) {
    j2.kickbans.callBan(adminName,command,new Location(j2.getServer().getWorlds().get(0),0,0,0,0,0));
    done=true;
  }
  if (com.equalsIgnoreCase("String_Node_Str") && command.length > 1) {
    j2.chat.gMsg(adminName,j2.combineSplit(1,command,"String_Node_Str"));
    done=true;
  }
  if (com.equalsIgnoreCase("String_Node_Str") && command.length > 1) {
    j2.chat.aMsg(adminName,j2.combineSplit(1,command,"String_Node_Str"));
    done=true;
  }
  if (com.equalsIgnoreCase("String_Node_Str") && command.length > 2) {
    j2.kickbans.callAddBan(adminName,command,new Location(j2.getServer().getWorlds().get(0),0,0,0,0,0));
    done=true;
  }
  if (com.equalsIgnoreCase("String_Node_Str") && command.length > 1) {
    j2.kickbans.unban(adminName,command[1]);
    done=true;
  }
  if (done) {
    j2.log.log(Level.INFO,"String_Node_Str" + adminName + "String_Node_Str"+ nick+ "String_Node_Str"+ host+ "String_Node_Str"+ commands);
  }
 else {
    j2.log.log(Level.INFO,"String_Node_Str" + adminName + "String_Node_Str"+ nick+ "String_Node_Str"+ host+ "String_Node_Str"+ commands);
  }
  return done;
}