nus-yam/ex-repair huggingface dataset:
Program: 87050
Project: 87050
Buggy source:
/** 
 * Compares this object with the provided AuthzUser object for equality.
 * @param object Object to compare
 */
@Override public boolean equals(final Object object){
  if (this == object) {
    return true;
  }
  if (object == null) {
    return false;
  }
  if (getClass() != object.getClass()) {
    return false;
  }
  final AuthzUserImpl other=(AuthzUserImpl)object;
  if (alias == null) {
    if (other.alias != null) {
      return false;
    }
  }
 else   if (!alias.equals(other.alias)) {
    return false;
  }
  if (name == null) {
    if (other.name != null) {
      return false;
    }
  }
 else   if (!name.equals(other.name)) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Compares this object with the provided AuthzUser object for equality.
 * @param object Object to compare
 */
@Override public boolean equals(final Object object){
  if (this == object) {
    return true;
  }
  if (object == null) {
    return false;
  }
  if (getClass() != object.getClass()) {
    return false;
  }
  final AuthzUserImpl other=(AuthzUserImpl)object;
  if (alias == null) {
    if (other.alias != null) {
      return false;
    }
  }
 else   if (!alias.equals(other.alias)) {
    return false;
  }
  if (getName() == null) {
    if (other.getName() != null) {
      return false;
    }
  }
 else   if (!getName().equals(other.getName())) {
    return false;
  }
  return true;
}
Program: 87051
Project: 87051
Buggy source:
/** 
 * Creates a string representation of this user.
 * @return String representation of this user
 */
@Override public String toString(){
  final ToStringBuilder toStringBuilder=new ToStringBuilder(this);
  toStringBuilder.append("String_Node_Str",name).append("String_Node_Str",alias);
  return toStringBuilder.toString();
}

Fixed version (ground truth):
/** 
 * Creates a string representation of this user.
 * @return String representation of this user
 */
@Override public String toString(){
  final ToStringBuilder toStringBuilder=new ToStringBuilder(this);
  toStringBuilder.append("String_Node_Str",getName()).append("String_Node_Str",alias);
  return toStringBuilder.toString();
}
Program: 87052
Project: 87052
Buggy source:
/** 
 * Change Membership action handler. Displays ChangeMembership dialog.
 */
private void changeMembership(){
  Object[] selectedItems=getUsersPane().getUserList().getSelectedValues();
  if (selectedItems.length == 0) {
    displayWarning(ResourceUtil.getString("String_Node_Str"));
  }
 else {
    User selectedUser=null;
    for (int i=0; i < selectedItems.length; i++) {
      Message message=new Message();
      JDialog dialog=new ChangeMembershipDialog((User)selectedItems[i],message);
      DialogUtil.center(this,dialog);
      dialog.setVisible(true);
      if (message.getState() == Message.SUCCESS) {
        selectedUser=(User)message.getUserObject();
      }
 else       if (message.getUserObject() == null) {
        selectedUser=(User)selectedItems[i];
      }
      if (message.getState() == Message.CANCEL) {
        break;
      }
    }
    refreshUserList(selectedUser);
    refreshAccessRuleTree(null);
  }
  updateTitle();
}

Fixed version (ground truth):
/** 
 * Change Membership action handler. Displays ChangeMembership dialog.
 */
private void changeMembership(){
  Object[] selectedItems=getUsersPane().getUserList().getSelectedValues();
  if (selectedItems.length == 0) {
    displayWarning(ResourceUtil.getString("String_Node_Str"));
  }
 else {
    User selectedUser=null;
    for (int i=0; i < selectedItems.length; i++) {
      Message message=new Message();
      JDialog dialog=new ChangeMembershipDialog((User)selectedItems[i],message);
      DialogUtil.center(this,dialog);
      dialog.setVisible(true);
      if (message.getState() == Message.SUCCESS) {
        selectedUser=(User)message.getUserObject();
      }
 else       if (message.getUserObject() == null) {
        selectedUser=(User)selectedItems[i];
      }
      if (message.getState() == Message.CANCEL) {
        break;
      }
    }
    refreshUserList(selectedUser);
    refreshGroupDetails();
    refreshAccessRuleTree(null);
  }
  updateTitle();
}
Program: 87054
Project: 87054
Buggy source:
/** 
 * This method initializes groupRadioButton.
 * @return javax.swing.JRadioButton
 */
private JRadioButton getGroupRadioButton(){
  if (groupRadioButton == null) {
    groupRadioButton=new JRadioButton();
    groupRadioButton.addActionListener(this);
    groupRadioButton.setActionCommand(GROUP_ACTION);
    groupRadioButton.setText(ResourceUtil.getString(type + "String_Node_Str"));
    groupRadioButton.setFont(new Font("String_Node_Str",Font.PLAIN,12));
    if (accessRule != null && accessRule.getGroup() != null) {
      groupRadioButton.setSelected(true);
    }
 else {
      groupRadioButton.setSelected(true);
    }
  }
  return groupRadioButton;
}

Fixed version (ground truth):
/** 
 * This method initializes groupRadioButton.
 * @return javax.swing.JRadioButton
 */
private JRadioButton getGroupRadioButton(){
  if (groupRadioButton == null) {
    groupRadioButton=new JRadioButton();
    groupRadioButton.addActionListener(this);
    groupRadioButton.setActionCommand(GROUP_ACTION);
    groupRadioButton.setText(ResourceUtil.getString(type + "String_Node_Str"));
    groupRadioButton.setFont(new Font("String_Node_Str",Font.PLAIN,12));
    if (accessRule != null) {
      if (accessRule.getGroup() != null) {
        groupRadioButton.setSelected(true);
      }
    }
 else {
      groupRadioButton.setSelected(true);
    }
  }
  return groupRadioButton;
}
Program: 87056
Project: 87056
Buggy source:
private void renameUser(String userName) throws ApplicationException {
  validateUserName(userName);
  User existingUser=document.findUser(userName);
  if (existingUser == null || existingUser == user) {
    message.setUserObject(document.renameUser(existingUser,userName));
    message.setState(Message.SUCCESS);
    dispose();
  }
 else {
    displayError(ResourceUtil.getFormattedString(type + "String_Node_Str",userName));
  }
}

Fixed version (ground truth):
private void renameUser(String userName) throws ApplicationException {
  validateUserName(userName);
  User existingUser=document.findUser(userName);
  if (existingUser == null || existingUser == user) {
    message.setUserObject(document.renameUser(user,userName));
    message.setState(Message.SUCCESS);
    dispose();
  }
 else {
    displayError(ResourceUtil.getFormattedString(type + "String_Node_Str",userName));
  }
}
Program: 87057
Project: 87057
Buggy source:
private void renameGroup(String groupName) throws ApplicationException {
  validateGroupName(groupName);
  Group existingGroup=document.findGroup(groupName);
  if (existingGroup == null || existingGroup == group) {
    message.setUserObject(document.renameGroup(existingGroup,groupName));
    message.setState(Message.SUCCESS);
    dispose();
  }
 else {
    displayError(ResourceUtil.getFormattedString(type + "String_Node_Str",groupName));
  }
}

Fixed version (ground truth):
private void renameGroup(String groupName) throws ApplicationException {
  validateGroupName(groupName);
  Group existingGroup=document.findGroup(groupName);
  if (existingGroup == null || existingGroup == group) {
    message.setUserObject(document.renameGroup(group,groupName));
    message.setState(Message.SUCCESS);
    dispose();
  }
 else {
    displayError(ResourceUtil.getFormattedString(type + "String_Node_Str",groupName));
  }
}
Program: 87058
Project: 87058
Buggy source:
/** 
 * Add/Remove Members action handler. Displays AddRemoveMembers dialog.
 */
private void addRemoveMembers(){
  Object[] selectedItems=getGroupsPane().getGroupList().getSelectedValues();
  if (selectedItems.length == 0) {
    displayWarning(ResourceUtil.getString("String_Node_Str"));
  }
 else {
    Group selectedGroup=null;
    for (int i=0; i < selectedItems.length; i++) {
      Message message=new Message();
      JDialog dialog=new AddRemoveMembersDialog((Group)selectedItems[i],message);
      DialogUtil.center(this,dialog);
      dialog.setVisible(true);
      if (message.getState() == Message.SUCCESS) {
        selectedGroup=(Group)message.getUserObject();
      }
 else       if (message.getUserObject() == null) {
        selectedGroup=(Group)selectedItems[i];
      }
      if (message.getState() == Message.CANCEL) {
        break;
      }
    }
    refreshGroupList(selectedGroup);
    refreshAccessRuleTree(null);
  }
  updateTitle();
}

Fixed version (ground truth):
/** 
 * Add/Remove Members action handler. Displays AddRemoveMembers dialog.
 */
private void addRemoveMembers(){
  Object[] selectedItems=getGroupsPane().getGroupList().getSelectedValues();
  if (selectedItems.length == 0) {
    displayWarning(ResourceUtil.getString("String_Node_Str"));
  }
 else {
    Group selectedGroup=null;
    for (int i=0; i < selectedItems.length; i++) {
      Message message=new Message();
      JDialog dialog=new AddRemoveMembersDialog((Group)selectedItems[i],message);
      DialogUtil.center(this,dialog);
      dialog.setVisible(true);
      if (message.getState() == Message.SUCCESS) {
        selectedGroup=(Group)message.getUserObject();
      }
 else       if (message.getUserObject() == null) {
        selectedGroup=(Group)selectedItems[i];
      }
      if (message.getState() == Message.CANCEL) {
        break;
      }
    }
    refreshUserDetails();
    refreshGroupList(selectedGroup);
    refreshAccessRuleTree(null);
  }
  updateTitle();
}
Program: 87059
Project: 87059
Buggy source:
/** 
 * ActionPerformed event handler.
 */
public void actionPerformed(ActionEvent e){
  if (e.getActionCommand().equals(Constants.ASSIGN_ACTION)) {
    assign();
  }
 else   if (e.getActionCommand().equals(Constants.UNASSIGN_ACTION)) {
    unassign();
  }
 else   if (e.getActionCommand().equals(Constants.SAVE_ACTION)) {
    try {
      Document.changeUserMembership(user,memberOf);
      message.setUserObject(user);
      message.setState(Message.SUCCESS);
      dispose();
    }
 catch (    Exception ex) {
      displayError(ex.getMessage());
    }
  }
 else   if (e.getActionCommand().equals("String_Node_Str")) {
    message.setState(Message.CANCEL);
    dispose();
  }
}

Fixed version (ground truth):
/** 
 * ActionPerformed event handler.
 */
public void actionPerformed(ActionEvent e){
  if (e.getActionCommand().equals(Constants.ASSIGN_ACTION)) {
    assign();
  }
 else   if (e.getActionCommand().equals(Constants.UNASSIGN_ACTION)) {
    unassign();
  }
 else   if (e.getActionCommand().equals(Constants.SAVE_ACTION)) {
    try {
      Document.changeUserMembership(user,memberOf);
      message.setUserObject(user);
      message.setState(Message.SUCCESS);
      dispose();
    }
 catch (    Exception ex) {
      displayError(ex.getMessage());
    }
  }
 else   if (e.getActionCommand().equals(Constants.CANCEL_ACTION)) {
    message.setState(Message.CANCEL);
    dispose();
  }
}
Program: 87060
Project: 87060
Buggy source:
/** 
 * KeyPressed event handler.
 * @param event KeyEvent object.
 */
public void keyPressed(KeyEvent event){
  int code=event.getKeyCode();
  if (code == KeyEvent.VK_SPACE) {
    if (event.getComponent() == getMemberList()) {
      unassignMembers();
    }
 else     if (event.getComponent() == getNonMemberList()) {
      assignMembers();
    }
  }
}

Fixed version (ground truth):
/** 
 * KeyPressed event handler.
 * @param event KeyEvent object.
 */
public void keyPressed(KeyEvent event){
  int code=event.getKeyCode();
  if (code == KeyEvent.VK_SPACE) {
    if (event.getComponent() == getMemberList()) {
      unassignMembers();
    }
 else     if (event.getComponent() == getNonMemberList()) {
      assignMembers();
    }
  }
 else {
    super.keyPressed(event);
  }
}
Program: 87061
Project: 87061
Buggy source:
/** 
 * KeyPressed event handler.
 * @param event KeyEvent object.
 */
public void keyPressed(KeyEvent event){
  int code=event.getKeyCode();
  if (code == KeyEvent.VK_SPACE) {
    if (event.getComponent() == getMemberOfList()) {
      unassign();
    }
 else     if (event.getComponent() == getNotMemberOfList()) {
      assign();
    }
  }
}

Fixed version (ground truth):
/** 
 * KeyPressed event handler.
 * @param event KeyEvent object.
 */
public void keyPressed(KeyEvent event){
  int code=event.getKeyCode();
  if (code == KeyEvent.VK_SPACE) {
    if (event.getComponent() == getMemberOfList()) {
      unassign();
    }
 else     if (event.getComponent() == getNotMemberOfList()) {
      assign();
    }
  }
 else {
    super.keyPressed(event);
  }
}
Program: 87063
Project: 87063
Buggy source:
/** 
 * Adds a new Group if one by the same name doesn't already exist. If an existing group exists it will be returned intact.
 * @param groupName Name of the Group.
 * @param groupMembers Group members of the new Group.
 * @param userMembers User members of the new Group.
 * @return Newly created or found Group.
 * @throws ApplicationException
 */
public static Group addGroupByName(String groupName,List<String> groupMemberNames,List<String> userMemberNames) throws ApplicationException {
  Validator.validateGroupName(groupName);
  Group group=findGroup(groupName);
  if (group == null) {
    List<Group> groupMemberList=new ArrayList<Group>();
    List<User> userMemberList=new ArrayList<User>();
    group=new Group(groupName,groupMemberList,userMemberList);
    if (groupMemberNames != null) {
      for (      String groupMemberName : groupMemberNames) {
        Group member=addGroup(groupMemberName);
        member.addGroup(group);
        groupMemberList.add(member);
      }
    }
    if (userMemberNames != null) {
      for (      String userMemberName : userMemberNames) {
        User member=addUser(userMemberName);
        member.addGroup(group);
        userMemberList.add(member);
      }
    }
    groups.add(group);
  }
  setUnsavedChanges();
  return group;
}

Fixed version (ground truth):
/** 
 * Adds a new Group if one by the same name doesn't already exist. If an existing group exists it will be returned intact.
 * @param groupName Name of the Group.
 * @param groupMembers Group members of the new Group.
 * @param userMembers User members of the new Group.
 * @return Newly created or found Group.
 * @throws ApplicationException
 */
public static Group addGroupByName(String groupName,List<String> groupMemberNames,List<String> userMemberNames) throws ApplicationException {
  Validator.validateGroupName(groupName);
  Group group=findGroup(groupName);
  if (group == null) {
    group=new Group(groupName);
    addMembersByName(group,groupMemberNames,userMemberNames);
    groups.add(group);
  }
  setUnsavedChanges();
  return group;
}
Program: 87064
Project: 87064
Buggy source:
/** 
 * Add user to groups.
 * @param userName Name of user
 * @param groupNames List of groups
 * @throws ApplicationException Error occurred
 */
private static void addGroups(String userName,String[] groupNames) throws ApplicationException {
  if (userName == null) {
    throw new ApplicationException(ResourceUtil.getString("String_Node_Str"));
  }
  if (groupNames == null || groupNames.length < 1) {
    throw new ApplicationException(ResourceUtil.getString("String_Node_Str"));
  }
  User user=Document.findUser(userName);
  if (user == null) {
    throw new ApplicationException(ResourceUtil.getFormattedString("String_Node_Str",userName));
  }
  for (  String groupName : groupNames) {
    Group group=Document.findGroup(groupName);
    if (group == null) {
      throw new ApplicationException(ResourceUtil.getFormattedString("String_Node_Str",groupName));
    }
    user.addGroup(group);
  }
}

Fixed version (ground truth):
/** 
 * Add user to groups.
 * @param userName Name of user
 * @param groupNames List of groups
 * @throws ApplicationException Error occurred
 */
private static void addGroups(String userName,String[] groupNames) throws ApplicationException {
  if (userName == null) {
    throw new ApplicationException(ResourceUtil.getString("String_Node_Str"));
  }
  if (groupNames == null || groupNames.length < 1) {
    throw new ApplicationException(ResourceUtil.getString("String_Node_Str"));
  }
  User user=Document.findUser(userName);
  if (user == null) {
    user=Document.addUser(userName);
  }
  for (  String groupName : groupNames) {
    Group group=Document.findGroup(groupName);
    if (group == null) {
      throw new ApplicationException(ResourceUtil.getFormattedString("String_Node_Str",groupName));
    }
    user.addGroup(group);
    group.addUserMember(user);
  }
}
Program: 87066
Project: 87066
Buggy source:
/** 
 * Removes user from groups.
 * @param userName Name of user
 * @param groupNames List of groups
 * @throws ApplicationException Error occurred
 */
private static void removeGroups(String userName,String[] groupNames) throws ApplicationException {
  if (userName == null) {
    throw new ApplicationException(ResourceUtil.getString("String_Node_Str"));
  }
  if (groupNames == null || groupNames.length < 1) {
    throw new ApplicationException(ResourceUtil.getString("String_Node_Str"));
  }
  User user=Document.findUser(userName);
  if (user == null) {
    throw new ApplicationException(ResourceUtil.getFormattedString("String_Node_Str",userName));
  }
  for (  String groupName : groupNames) {
    Group group=Document.findGroup(groupName);
    if (group == null) {
      throw new ApplicationException(ResourceUtil.getFormattedString("String_Node_Str",groupName));
    }
    user.removeGroup(group);
  }
}

Fixed version (ground truth):
/** 
 * Removes user from groups.
 * @param userName Name of user
 * @param groupNames List of groups
 * @throws ApplicationException Error occurred
 */
private static void removeGroups(String userName,String[] groupNames) throws ApplicationException {
  if (userName == null) {
    throw new ApplicationException(ResourceUtil.getString("String_Node_Str"));
  }
  if (groupNames == null || groupNames.length < 1) {
    throw new ApplicationException(ResourceUtil.getString("String_Node_Str"));
  }
  User user=Document.findUser(userName);
  if (user == null) {
    throw new ApplicationException(ResourceUtil.getFormattedString("String_Node_Str",userName));
  }
  for (  String groupName : groupNames) {
    Group group=Document.findGroup(groupName);
    if (group == null) {
      throw new ApplicationException(ResourceUtil.getFormattedString("String_Node_Str",groupName));
    }
    user.removeGroup(group);
    group.removeUserMember(user);
  }
}
Program: 87069
Project: 87069
Buggy source:
/** 
 * Add new user and/or group members to an existing group. New user and  group members may be added at the same time. At least one user or group name is required.
 * @param groupName Group name to be updated
 * @param userNames User names of new members
 * @param groupNames Group names of new members
 * @throws ApplicationException Error occurred
 */
private static void addMembers(String groupName,String[] userNames,String[] groupNames) throws ApplicationException {
  if (groupName == null) {
    throw new ApplicationException(ResourceUtil.getString("String_Node_Str"));
  }
  if ((userNames == null || userNames.length < 1) && (groupNames == null || groupNames.length < 1)) {
    throw new ApplicationException(ResourceUtil.getString("String_Node_Str"));
  }
  Group group=Document.findGroup(groupName);
  if (group == null) {
    throw new ApplicationException(ResourceUtil.getFormattedString("String_Node_Str",groupName));
  }
  for (  String memberUserName : userNames) {
    User memberUser=Document.findUser(memberUserName);
    if (memberUser == null) {
      memberUser=Document.addUser(memberUserName);
    }
    group.addUserMember(memberUser);
  }
  for (  String memberGroupName : groupNames) {
    Group memberGroup=Document.findGroup(memberGroupName);
    if (memberGroup == null) {
      throw new ApplicationException(ResourceUtil.getFormattedString("String_Node_Str",groupName));
    }
    group.addGroupMember(memberGroup);
  }
}

Fixed version (ground truth):
/** 
 * Add new user and/or group members to an existing group. New user and  group members may be added at the same time. At least one user or group name is required.
 * @param groupName Group name to be updated
 * @param userNames User names of new members
 * @param groupNames Group names of new members
 * @throws ApplicationException Error occurred
 */
private static void addMembers(String groupName,String[] userNames,String[] groupNames) throws ApplicationException {
  if (groupName == null) {
    throw new ApplicationException(ResourceUtil.getString("String_Node_Str"));
  }
  if ((userNames == null || userNames.length < 1) && (groupNames == null || groupNames.length < 1)) {
    throw new ApplicationException(ResourceUtil.getString("String_Node_Str"));
  }
  Group group=Document.findGroup(groupName);
  if (group == null) {
    throw new ApplicationException(ResourceUtil.getFormattedString("String_Node_Str",groupName));
  }
  for (  String memberUserName : userNames) {
    User memberUser=Document.findUser(memberUserName);
    if (memberUser == null) {
      memberUser=Document.addUser(memberUserName);
    }
    group.addUserMember(memberUser);
  }
  for (  String memberGroupName : groupNames) {
    Group memberGroup=Document.findGroup(memberGroupName);
    if (memberGroup == null) {
      throw new ApplicationException(ResourceUtil.getFormattedString("String_Node_Str",memberGroupName));
    }
    group.addGroupMember(memberGroup);
  }
}
Program: 87071
Project: 87071
Buggy source:
/** 
 * This method initializes fileToolBar
 * @return javax.swing.JToolBar
 */
private JToolBar getActionToolBar(){
  if (actionToolBar == null) {
    actionToolBar=new JToolBar();
    actionToolBar.setFloatable(true);
    actionToolBar.add(getAddUserToolbarButton());
    actionToolBar.add(getAddGroupToolbarButton());
    actionToolBar.add(getAddAccessRuleButton());
    actionToolBar.add(getPreviewToolbarButton());
  }
  return actionToolBar;
}

Fixed version (ground truth):
/** 
 * This method initializes fileToolBar
 * @return javax.swing.JToolBar
 */
private JToolBar getActionToolBar(){
  if (actionToolBar == null) {
    actionToolBar=new JToolBar();
    actionToolBar.setFloatable(false);
    actionToolBar.add(getNewToolbarButton());
    actionToolBar.add(getOpenToolbarButton());
    actionToolBar.add(getSaveToolbarButton());
    actionToolBar.add(getSaveAsToolbarButton());
    actionToolBar.add(getAddUserToolbarButton());
    actionToolBar.add(getAddGroupToolbarButton());
    actionToolBar.add(getAddAccessRuleButton());
    actionToolBar.add(getPreviewToolbarButton());
  }
  return actionToolBar;
}
Program: 87072
Project: 87072
Buggy source:
/** 
 * Create a new ZAliasedName given it's full name.
 * @param fullname The full name: [[schema.]table.]column
 * @param form The name form (FORM_TABLE or FORM_COLUMN)
 */
public ZAliasedName(final String fullname,final int form){
  this.formColumn=form;
  this.strform=new String(fullname);
  final StringTokenizer st=new StringTokenizer(fullname,"String_Node_Str");
switch (st.countTokens()) {
case ZAliasedName.MAGIC_NUMBER_1:
    if (form == ZAliasedName.FORM_TABLE) {
      this.table=new String(st.nextToken());
    }
 else {
      this.column=new String(st.nextToken());
    }
  break;
case ZAliasedName.MAGIC_NUMBER_2:
if (form == ZAliasedName.FORM_TABLE) {
  this.schema=new String(st.nextToken());
  this.table=new String(st.nextToken());
}
 else {
  this.table=new String(st.nextToken());
  this.column=new String(st.nextToken());
}
break;
case ZAliasedName.MAGIC_NUMBER_3:
default :
this.schema=new String(st.nextToken());
this.table=new String(st.nextToken());
this.column=new String(st.nextToken());
break;
}
this.schema=this.postProcess(this.schema);
this.table=this.postProcess(this.table);
this.column=this.postProcess(this.column);
}

Fixed version (ground truth):
/** 
 * Create a new ZAliasedName given it's full name.
 * @param fullname The full name: [[schema.]table.]column
 * @param form The name form (FORM_TABLE or FORM_COLUMN)
 */
public ZAliasedName(final String fullname,final int form){
  this.formColumn=form;
  this.strform=new String(fullname);
  final StringTokenizer st=new StringTokenizer(fullname,"String_Node_Str");
switch (st.countTokens()) {
case ZAliasedName.MAGIC_NUMBER_1:
    if (form == ZAliasedName.FORM_TABLE) {
      this.table=new String(st.nextToken());
    }
 else {
      this.column=new String(st.nextToken());
    }
  break;
case ZAliasedName.MAGIC_NUMBER_2:
if (form == ZAliasedName.FORM_TABLE) {
  this.schema=new String(st.nextToken());
  this.table=new String(st.nextToken());
}
 else {
  this.table=new String(st.nextToken());
  this.column=new String(st.nextToken());
}
break;
case ZAliasedName.MAGIC_NUMBER_3:
default :
this.schema=new String(st.nextToken());
this.table=new String(st.nextToken());
this.column=new String(st.nextToken());
break;
}
if (this.schema != null) {
this.schema=this.postProcess(this.schema);
}
if (this.table != null) {
this.table=this.postProcess(this.table);
}
if (this.column != null) {
this.column=this.postProcess(this.column);
}
}
Program: 87073
Project: 87073
Buggy source:
/** 
 * Post process.
 * @param val the value.
 * @return the trimmed query
 */
private String postProcess(final String val){
  String result=null;
  if (val == null) {
    result=null;
  }
  if (val.indexOf(ZAliasedName.LEFT_BRACE) >= 0) {
    result=val.substring(val.lastIndexOf(ZAliasedName.LEFT_BRACE) + 1);
  }
  if (val.indexOf(ZAliasedName.RIGHT_BRACE) >= 0) {
    result=val.substring(0,val.indexOf(ZAliasedName.RIGHT_BRACE));
  }
  return result.trim();
}

Fixed version (ground truth):
/** 
 * Post process.
 * @param val the value.
 * @return the trimmed query
 */
private String postProcess(final String val){
  String result=null;
  if (val == null) {
    result=null;
  }
  if (val.indexOf(ZAliasedName.LEFT_BRACE) >= 0) {
    result=val.substring(val.lastIndexOf(ZAliasedName.LEFT_BRACE) + 1);
  }
  if (val.indexOf(ZAliasedName.RIGHT_BRACE) >= 0) {
    result=val.substring(0,val.indexOf(ZAliasedName.RIGHT_BRACE));
  }
  if (result == null && val != null) {
    result=val;
  }
  return result.trim();
}
Program: 87074
Project: 87074
Buggy source:
/** 
 * Get the aggregate call.
 * @param c the call string.
 * @return the aggregate call.
 */
public static String getAggregateCall(final String c){
  final int pos=c.indexOf('(');
  String result;
  if (pos <= 0) {
    result=null;
  }
  final String call=c.substring(0,pos);
  if (ZUtils.isAggregate(call)) {
    result=call.trim();
  }
 else {
    result=null;
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Get the aggregate call.
 * @param c the call string.
 * @return the aggregate call.
 */
public static String getAggregateCall(final String c){
  final int pos=c.indexOf('(');
  String result;
  if (pos <= 0) {
    result=null;
  }
 else {
    final String call=c.substring(0,pos);
    if (ZUtils.isAggregate(call)) {
      result=call.trim();
    }
 else {
      result=null;
    }
  }
  if (result == null && c != null) {
    result=c;
  }
  return result;
}
Program: 87075
Project: 87075
Buggy source:
/** 
 * Return the name of the attribute corresponding to the index.
 * @param index integer giving the index of the attribute
 * @return a String
 */
public final String getAttName(final int index){
  String getAttributeName;
  try {
    getAttributeName=(String)this.attributes.elementAt(index);
  }
 catch (  final ArrayIndexOutOfBoundsException e) {
    getAttributeName=null;
  }
  return getAttributeName;
}

Fixed version (ground truth):
/** 
 * Return the name of the attribute corresponding to the index.
 * @param index integer giving the index of the attribute
 * @return a String
 */
public String getAttName(final int index){
  String getAttributeName;
  try {
    getAttributeName=(String)this.attributes.elementAt(index);
  }
 catch (  final ArrayIndexOutOfBoundsException e) {
    getAttributeName=null;
  }
  return getAttributeName;
}
Program: 87076
Project: 87076
Buggy source:
/** 
 * Return the value of the attribute whith the given name.
 * @param name the name of the attribute.
 * @return an Object (null if name is not an existing attribute)
 */
public final Object getAttValue(final String name){
  boolean exist=false;
  if (name != null) {
    exist=this.searchTable.containsKey(name);
  }
  Object getAttributeValue;
  if (exist) {
    final int index=((Integer)this.searchTable.get(name)).intValue();
    getAttributeValue=this.values.elementAt(index);
  }
 else {
    getAttributeValue=null;
  }
  return getAttributeValue;
}

Fixed version (ground truth):
/** 
 * Return the value of the attribute whith the given name.
 * @param name the name of the attribute.
 * @return an Object (null if name is not an existing attribute)
 */
public Object getAttValue(final String name){
  boolean exist=false;
  if (name != null) {
    exist=this.searchTable.containsKey(name);
  }
  Object getAttributeValue;
  if (exist) {
    final int index=((Integer)this.searchTable.get(name)).intValue();
    getAttributeValue=this.values.elementAt(index);
  }
 else {
    getAttributeValue=null;
  }
  return getAttributeValue;
}
Program: 87077
Project: 87077
Buggy source:
public void generateJSON(Class clazz){
  Field[] SMClasses=getAllFields(clazz);
  searchForSMClasses(clazz,SMClasses);
}

Fixed version (ground truth):
public void generateJSON(Class clazz){
  Field[] SMClasses=getAllFields(clazz);
  searchForClasses(clazz,SMClasses);
}
Program: 87078
Project: 87078
Buggy source:
public ClassConverter(Class clazz,String location){
  System.out.println();
  this.listOfFields=getAllFields(clazz);
  this.location=location;
  searchForSMClasses(clazz,this.listOfFields);
}

Fixed version (ground truth):
public ClassConverter(Class clazz,String location){
  this.fields=getAllFields(clazz);
  this.location=location;
  searchForClasses(clazz,this.fields);
}
Program: 87079
Project: 87079
Buggy source:
public void dump(){
  if (!log.isDebugEnabled())   return;
  StringBuilder sb=new StringBuilder();
  for (  RemoteAddress address : channels.keySet()) {
    sb.append("String_Node_Str");
    sb.append(address.toString());
    for (    Integer i : channels.get(address)) {
      sb.append("String_Node_Str");
      sb.append(i);
      sb.append("String_Node_Str");
      if (isChannelIdle.get(i))       sb.append("String_Node_Str");
 else       sb.append("String_Node_Str");
    }
  }
  log.debug(sb.toString());
}

Fixed version (ground truth):
public void dump(){
  if (!log.isDebugEnabled())   return;
  StringBuilder sb=new StringBuilder();
synchronized (channels) {
    for (    RemoteAddress address : channels.keySet()) {
      sb.append("String_Node_Str");
      sb.append(address.toString());
      for (      Integer i : channels.get(address)) {
        sb.append("String_Node_Str");
        sb.append(i);
        sb.append("String_Node_Str");
        if (isChannelIdle.get(i))         sb.append("String_Node_Str");
 else         sb.append("String_Node_Str");
      }
    }
  }
  log.debug(sb.toString());
}
Program: 87080
Project: 87080
Buggy source:
private ChannelFutureListener getMITMChannelFutureListener(){
  return new ChannelFutureListener(){
    public void operationComplete(    final ChannelFuture inboundFuture){
      log.debug("String_Node_Str",inboundFuture.getChannel().getId());
      final ChannelPipeline pipe=inboundFuture.getChannel().getPipeline();
      pipe.getChannel().setReadable(false);
      while (pipe.getFirst() != null)       pipe.removeFirst();
      SSLEngine engine=context.createSSLEngine();
      engine.setUseClientMode(false);
      NextProtoNego.put(engine,new SimpleServerProvider());
      if (log.isDebugEnabled())       NextProtoNego.debug=true;
      pipe.addLast("String_Node_Str",new SslHandler(engine));
      pipe.addLast("String_Node_Str",new HttpOrSpdyDecoder(new HttpProxyHandler()));
      pipe.getChannel().setReadable(true);
    }
  }
;
}

Fixed version (ground truth):
private ChannelFutureListener getMITMChannelFutureListener(){
  return new ChannelFutureListener(){
    public void operationComplete(    final ChannelFuture inboundFuture){
      log.debug("String_Node_Str",inboundFuture.getChannel().getId());
      final ChannelPipeline pipe=inboundFuture.getChannel().getPipeline();
      while (pipe.getFirst() != null)       pipe.removeFirst();
      SSLEngine engine=context.createSSLEngine();
      engine.setUseClientMode(false);
      NextProtoNego.put(engine,new SimpleServerProvider());
      if (log.isDebugEnabled())       NextProtoNego.debug=true;
      pipe.addLast("String_Node_Str",new SslHandler(engine));
      pipe.addLast("String_Node_Str",new HttpOrSpdyDecoder(new HttpProxyHandler()));
      pipe.getChannel().setReadable(true);
    }
  }
;
}
Program: 87081
Project: 87081
Buggy source:
private ChannelFutureListener getPassthroughChannelFutureListener(final Channel outboundChannel){
  return new ChannelFutureListener(){
    public void operationComplete(    ChannelFuture inboundFuture){
      log.debug("String_Node_Str",inboundFuture.getChannel().getId());
      final Channel inboundChannel=inboundFuture.getChannel();
      inboundChannel.setReadable(false);
      while (inboundChannel.getPipeline().getFirst() != null)       inboundChannel.getPipeline().removeFirst();
      inboundChannel.getPipeline().addLast("String_Node_Str",new PassthroughHandler(outboundChannel));
      inboundChannel.setReadable(true);
    }
  }
;
}

Fixed version (ground truth):
private ChannelFutureListener getPassthroughChannelFutureListener(final Channel outboundChannel){
  return new ChannelFutureListener(){
    public void operationComplete(    ChannelFuture inboundFuture){
      log.debug("String_Node_Str",inboundFuture.getChannel().getId());
      final Channel inboundChannel=inboundFuture.getChannel();
      while (inboundChannel.getPipeline().getFirst() != null)       inboundChannel.getPipeline().removeFirst();
      inboundChannel.getPipeline().addLast("String_Node_Str",new PassthroughHandler(outboundChannel));
      inboundChannel.setReadable(true);
    }
  }
;
}
Program: 87082
Project: 87082
Buggy source:
@Override public void messageReceived(final ChannelHandlerContext ctx,final MessageEvent e) throws Exception {
  final HttpRequest request=(HttpRequest)e.getMessage();
  if (request.getMethod().equals(HttpMethod.CONNECT)) {
    log.info("String_Node_Str",e.getChannel().getId(),request.getUri());
    log.debug("String_Node_Str",e.getChannel().getId(),request.toString());
    RemoteAddress address=RemoteAddress.parseRequest(request);
    if (context != null && address.getPort() == 443)     address=new RemoteAddress(address.getHost(),80);
    final ChannelPipelineFactory factory=getPipelineFactory(e.getChannel());
    final ChannelFuture outboundFuture=OutboundChannelPool.getInstance().getNewChannelFuture(address,factory);
    outboundFuture.addListener(new ChannelFutureListener(){
      public void operationComplete(      final ChannelFuture outboundFuture){
        log.info("String_Node_Str",e.getChannel().getId());
        final ChannelFuture inboundFuture=ctx.getChannel().write(getHttpResponseOk());
        if (context == null) {
          inboundFuture.addListener(getPassthroughChannelFutureListener(outboundFuture.getChannel()));
        }
 else {
          inboundFuture.addListener(getMITMChannelFutureListener());
          OutboundChannelPool.getInstance().setChannelIdle(outboundFuture);
        }
      }
    }
);
  }
 else {
    ctx.sendUpstream(e);
  }
}

Fixed version (ground truth):
@Override public void messageReceived(final ChannelHandlerContext ctx,final MessageEvent e) throws Exception {
  final HttpRequest request=(HttpRequest)e.getMessage();
  if (request.getMethod().equals(HttpMethod.CONNECT)) {
    log.info("String_Node_Str",e.getChannel().getId(),request.getUri());
    log.debug("String_Node_Str",e.getChannel().getId(),request.toString());
    RemoteAddress address=RemoteAddress.parseRequest(request);
    if (context != null && address.getPort() == 443)     address=new RemoteAddress(address.getHost(),80);
    final ChannelPipelineFactory factory=getPipelineFactory(e.getChannel());
    final ChannelFuture outboundFuture=OutboundChannelPool.getInstance().getNewChannelFuture(address,factory);
    outboundFuture.addListener(new ChannelFutureListener(){
      public void operationComplete(      final ChannelFuture outboundFuture){
        log.info("String_Node_Str",e.getChannel().getId());
        ctx.getChannel().setReadable(false);
        final ChannelFuture inboundFuture=ctx.getChannel().write(getHttpResponseOk());
        if (context == null) {
          inboundFuture.addListener(getPassthroughChannelFutureListener(outboundFuture.getChannel()));
        }
 else {
          inboundFuture.addListener(getMITMChannelFutureListener());
          OutboundChannelPool.getInstance().setChannelIdle(outboundFuture);
        }
      }
    }
);
  }
 else {
    ctx.sendUpstream(e);
  }
}
Program: 87083
Project: 87083
Buggy source:
public void operationComplete(ChannelFuture inboundFuture){
  log.debug("String_Node_Str",inboundFuture.getChannel().getId());
  final Channel inboundChannel=inboundFuture.getChannel();
  inboundChannel.setReadable(false);
  while (inboundChannel.getPipeline().getFirst() != null)   inboundChannel.getPipeline().removeFirst();
  inboundChannel.getPipeline().addLast("String_Node_Str",new PassthroughHandler(outboundChannel));
  inboundChannel.setReadable(true);
}

Fixed version (ground truth):
public void operationComplete(ChannelFuture inboundFuture){
  log.debug("String_Node_Str",inboundFuture.getChannel().getId());
  final Channel inboundChannel=inboundFuture.getChannel();
  while (inboundChannel.getPipeline().getFirst() != null)   inboundChannel.getPipeline().removeFirst();
  inboundChannel.getPipeline().addLast("String_Node_Str",new PassthroughHandler(outboundChannel));
  inboundChannel.setReadable(true);
}
Program: 87085
Project: 87085
Buggy source:
@Override public void responseReceived(final HttpResponse response){
  log.info("String_Node_Str",e.getChannel().getId(),response.getStatus());
  if (e.getChannel().isConnected())   e.getChannel().write(response);
 else   log.info("String_Node_Str",e.getChannel().getId());
}

Fixed version (ground truth):
@Override public void responseReceived(final HttpResponse response){
  log.info("String_Node_Str",e.getChannel().getId(),response.getStatus());
  if (e.getChannel().isConnected()) {
    if (request.getHeader("String_Node_Str") != null)     response.setHeader("String_Node_Str",request.getHeader("String_Node_Str"));
    e.getChannel().write(response);
  }
 else   log.info("String_Node_Str",e.getChannel().getId());
}
Program: 87086
Project: 87086
Buggy source:
public void handleUpstream(ChannelHandlerContext ctx,ChannelEvent e) throws Exception {
  final SslHandler sslHandler=ctx.getPipeline().get(SslHandler.class);
  final SimpleServerProvider provider=(SimpleServerProvider)NextProtoNego.get(sslHandler.getEngine());
  final String protocol=provider.getSelectedProtocol();
  if (protocol != null)   log.debug("String_Node_Str",protocol);
  if (SPDY_2.equals(protocol)) {
    ChannelPipeline pipeline=ctx.getPipeline();
    pipeline.addLast("String_Node_Str",new SpdyFrameDecoder());
    pipeline.addLast("String_Node_Str",new SpdyFrameEncoder());
    pipeline.addLast("String_Node_Str",new SpdySessionHandler(true));
    pipeline.addLast("String_Node_Str",new SpdyHttpEncoder());
    pipeline.addLast("String_Node_Str",new SpdyHttpDecoder(2 * 1024 * 1024));
    pipeline.addLast("String_Node_Str",handler);
    pipeline.remove(this);
    ctx.sendUpstream(e);
  }
 else   if (HTTP_1_1.equals(protocol)) {
    ChannelPipeline pipeline=ctx.getPipeline();
    pipeline.addLast("String_Node_Str",new HttpRequestDecoder());
    pipeline.addLast("String_Node_Str",new HttpResponseEncoder());
    pipeline.addLast("String_Node_Str",handler);
    pipeline.remove(this);
    ctx.sendUpstream(e);
  }
 else {
  }
}

Fixed version (ground truth):
public void handleUpstream(ChannelHandlerContext ctx,ChannelEvent e) throws Exception {
  final SslHandler sslHandler=ctx.getPipeline().get(SslHandler.class);
  final SimpleServerProvider provider=(SimpleServerProvider)NextProtoNego.get(sslHandler.getEngine());
  final String protocol=provider.getSelectedProtocol();
  if (protocol != null)   log.debug("String_Node_Str",protocol);
  if (SPDY_2.equals(protocol)) {
    ChannelPipeline pipeline=ctx.getPipeline();
    pipeline.addLast("String_Node_Str",new SpdyFrameDecoder());
    pipeline.addLast("String_Node_Str",new SpdyFrameEncoder());
    pipeline.addLast("String_Node_Str",new SpdySessionHandler(true));
    pipeline.addLast("String_Node_Str",new SpdyHttpEncoder());
    pipeline.addLast("String_Node_Str",new SpdyHttpDecoder(2 * 1024 * 1024));
    pipeline.addLast("String_Node_Str",new HttpProxyRequestDecoder());
    pipeline.addLast("String_Node_Str",handler);
    pipeline.remove(this);
    ctx.sendUpstream(e);
  }
 else   if (HTTP_1_1.equals(protocol)) {
    ChannelPipeline pipeline=ctx.getPipeline();
    pipeline.addLast("String_Node_Str",new HttpRequestDecoder());
    pipeline.addLast("String_Node_Str",new HttpResponseEncoder());
    pipeline.addLast("String_Node_Str",new HttpProxyRequestDecoder());
    pipeline.addLast("String_Node_Str",handler);
    pipeline.remove(this);
    ctx.sendUpstream(e);
  }
 else {
  }
}
Program: 87087
Project: 87087
Buggy source:
private ChannelPipelineFactoryFactory getHttpChannelPipelineFactoryFactory(final HttpRequest request,final Channel inboundChannel){
  return new ChannelPipelineFactoryFactory(){
    public ChannelPipelineFactory getChannelPipelineFactory(){
      List<ResponsePlugin> responsePlugins=PluginProvider.getInstance().getResponsePlugins(request);
      ChannelHandler outboundHandler=new org.jlange.proxy.outbound.HttpHandler(inboundChannel,responsePlugins);
      return new HttpPipelineFactory(outboundHandler);
    }
  }
;
}

Fixed version (ground truth):
private ChannelPipelineFactoryFactory getHttpChannelPipelineFactoryFactory(final HttpRequest request,final Channel inboundChannel){
  return new ChannelPipelineFactoryFactory(){
    public ChannelPipelineFactory getChannelPipelineFactory(){
      List<ResponsePlugin> responsePlugins=PluginProvider.getInstance().getResponsePlugins(request);
      ChannelFutureListener messageReceived=outboundChannelPool.setConnectionIdle(request);
      ChannelHandler outboundHandler=new org.jlange.proxy.outbound.HttpHandler(inboundChannel,responsePlugins,messageReceived);
      return new HttpPipelineFactory(outboundHandler);
    }
  }
;
}
Program: 87088
Project: 87088
Buggy source:
public ChannelPipelineFactory getChannelPipelineFactory(){
  List<ResponsePlugin> responsePlugins=PluginProvider.getInstance().getResponsePlugins(request);
  ChannelHandler outboundHandler=new org.jlange.proxy.outbound.HttpHandler(inboundChannel,responsePlugins);
  return new HttpPipelineFactory(outboundHandler);
}

Fixed version (ground truth):
public ChannelPipelineFactory getChannelPipelineFactory(){
  List<ResponsePlugin> responsePlugins=PluginProvider.getInstance().getResponsePlugins(request);
  ChannelFutureListener messageReceived=outboundChannelPool.setConnectionIdle(request);
  ChannelHandler outboundHandler=new org.jlange.proxy.outbound.HttpHandler(inboundChannel,responsePlugins,messageReceived);
  return new HttpPipelineFactory(outboundHandler);
}
Program: 87089
Project: 87089
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.change_picture);
  if (!started) {
    started=true;
    Intent cameraIntent=new Intent(this,CameraActivity.class);
    startActivityForResult(cameraIntent,TAKE_PICTURE);
  }
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.change_picture);
  if (!started) {
    started=true;
    Intent cameraIntent=new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
    fileUri=Util.getOutputMediaFileUri(Util.MEDIA_TYPE_IMAGE);
    cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT,fileUri);
    startActivityForResult(cameraIntent,TAKE_PICTURE);
  }
}
Program: 87090
Project: 87090
Buggy source:
@Override protected void onActivityResult(int requestCode,int resultCode,Intent data){
  if (requestCode == TAKE_PICTURE) {
    if (resultCode == Activity.RESULT_OK) {
      started=true;
      fileUri=data.getData();
      rotation=Util.getRotationDegrees(fileUri.getPath());
      ImageView imageView=(ImageView)findViewById(R.id.image1);
      imageView.setImageBitmap(Util.decodeSampledBitmapFromFile(fileUri.getPath(),200,200,rotation));
    }
 else {
      finish();
    }
  }
}

Fixed version (ground truth):
@Override protected void onActivityResult(int requestCode,int resultCode,Intent data){
  if (requestCode == TAKE_PICTURE) {
    if (resultCode == Activity.RESULT_OK) {
      started=true;
      rotation=Util.getRotationDegrees(fileUri.getPath());
      ImageView imageView=(ImageView)findViewById(R.id.image1);
      imageView.setImageBitmap(Util.decodeSampledBitmapFromFile(fileUri.getPath(),200,200,rotation));
    }
 else {
      finish();
    }
  }
}
Program: 87093
Project: 87093
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.change_picture);
  Intent intent=getIntent();
  id=intent.getLongExtra("String_Node_Str",0);
  if (fileUri == null) {
    Intent cameraIntent=new Intent(this,CameraActivity.class);
    startActivityForResult(cameraIntent,TAKE_PICTURE);
  }
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.change_picture);
  Intent intent=getIntent();
  id=intent.getLongExtra("String_Node_Str",0);
  if (fileUri == null) {
    Intent cameraIntent=new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
    fileUri=Util.getOutputMediaFileUri(Util.MEDIA_TYPE_IMAGE);
    cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT,fileUri);
    startActivityForResult(cameraIntent,TAKE_PICTURE);
  }
}
Program: 87094
Project: 87094
Buggy source:
@Override protected void onActivityResult(int requestCode,int resultCode,Intent data){
  if (requestCode == TAKE_PICTURE) {
    if (resultCode == Activity.RESULT_OK) {
      fileUri=data.getData();
      rotation=Util.getRotationDegrees(fileUri.getPath());
      ImageView imageView=(ImageView)findViewById(R.id.image1);
      imageView.setImageBitmap(Util.decodeSampledBitmapFromFile(fileUri.getPath(),200,200,rotation));
    }
 else {
      finish();
    }
  }
}

Fixed version (ground truth):
@Override protected void onActivityResult(int requestCode,int resultCode,Intent data){
  if (requestCode == TAKE_PICTURE) {
    if (resultCode == Activity.RESULT_OK) {
      rotation=Util.getRotationDegrees(fileUri.getPath());
      ImageView imageView=(ImageView)findViewById(R.id.image1);
      imageView.setImageBitmap(Util.decodeSampledBitmapFromFile(fileUri.getPath(),200,200,rotation));
    }
 else {
      finish();
    }
  }
}
Program: 87095
Project: 87095
Buggy source:
@Override public void addPlayerToWorld(Player player){
  world.d((net.minecraft.server.Entity)((CanaryPlayer)player).getHandle());
}

Fixed version (ground truth):
@Override public void addPlayerToWorld(Player player){
  world.d(((CanaryPlayer)player).getHandle());
}
Program: 87096
Project: 87096
Buggy source:
@Override public void removePlayerFromWorld(Player player){
  world.f((net.minecraft.server.Entity)((CanaryPlayer)player).getHandle());
}

Fixed version (ground truth):
@Override public void removePlayerFromWorld(Player player){
  world.f(((CanaryPlayer)player).getHandle());
}
Program: 87097
Project: 87097
Buggy source:
@Override public void makeLightningBolt(Position position){
  world.c(new EntityLightningBolt(world,(int)position.getX(),(int)position.getY(),(int)position.getZ()));
}

Fixed version (ground truth):
@Override public void makeLightningBolt(Position position){
  world.c(new EntityLightningBolt(world,position.getX(),position.getY(),position.getZ()));
}
Program: 87098
Project: 87098
Buggy source:
@Override public Block getBlockAt(Position position){
  return getBlockAt((int)position.getX(),(int)position.getY(),(int)position.getZ());
}

Fixed version (ground truth):
@Override public Block getBlockAt(Position position){
  return getBlockAt(position.getBlockX(),position.getBlockY(),position.getBlockZ());
}