nus-yam/ex-repair huggingface dataset:
Program: 38815
Project: 38815
Buggy source:
public xAuthPlayer getPlayerFromDb(String playerName){
  xAuthPlayer xPlayer=null;
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + "String_Node_Str" + xAuthSettings.tblAccount + "String_Node_Str"+ "String_Node_Str"+ xAuthSettings.tblSession+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    prepStmt.setString(1,playerName);
    rs=prepStmt.executeQuery();
    if (rs.next())     xPlayer=new xAuthPlayer(playerName,buildAccount(rs),buildSession(rs));
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + playerName,e);
  }
  return xPlayer;
}

Fixed version (ground truth):
public xAuthPlayer getPlayerFromDb(String playerName){
  if (!isConnected())   connect();
  xAuthPlayer xPlayer=null;
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + "String_Node_Str" + xAuthSettings.tblAccount + "String_Node_Str"+ "String_Node_Str"+ xAuthSettings.tblSession+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    prepStmt.setString(1,playerName);
    rs=prepStmt.executeQuery();
    if (rs.next())     xPlayer=new xAuthPlayer(playerName,buildAccount(rs),buildSession(rs));
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + playerName,e);
  }
  return xPlayer;
}
Program: 38816
Project: 38816
Buggy source:
protected void insertAccount(Account account){
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + xAuthSettings.tblAccount + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",Statement.RETURN_GENERATED_KEYS);
    prepStmt.setString(1,account.getPlayerName());
    prepStmt.setString(2,account.getPassword());
    prepStmt.setString(3,account.getEmail());
    prepStmt.setTimestamp(4,account.getRegisterDate());
    prepStmt.setString(5,account.getRegisterHost());
    prepStmt.setTimestamp(6,account.getLastLoginDate());
    prepStmt.setString(7,account.getLastLoginHost());
    prepStmt.setInt(8,account.getActive());
    prepStmt.executeUpdate();
    rs=prepStmt.getGeneratedKeys();
    if (rs.next())     account.setId(rs.getInt(1));
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + account.getPlayerName(),e);
  }
}

Fixed version (ground truth):
protected void insertAccount(Account account){
  if (!isConnected())   connect();
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + xAuthSettings.tblAccount + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",Statement.RETURN_GENERATED_KEYS);
    prepStmt.setString(1,account.getPlayerName());
    prepStmt.setString(2,account.getPassword());
    prepStmt.setString(3,account.getEmail());
    prepStmt.setTimestamp(4,account.getRegisterDate());
    prepStmt.setString(5,account.getRegisterHost());
    prepStmt.setTimestamp(6,account.getLastLoginDate());
    prepStmt.setString(7,account.getLastLoginHost());
    prepStmt.setInt(8,account.getActive());
    prepStmt.executeUpdate();
    rs=prepStmt.getGeneratedKeys();
    if (rs.next())     account.setId(rs.getInt(1));
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + account.getPlayerName(),e);
  }
}
Program: 38817
Project: 38817
Buggy source:
public DataManager(){
  if (xAuthSettings.datasource.equals("String_Node_Str"))   connectMySQL();
 else   connectH2();
}

Fixed version (ground truth):
public DataManager(){
  connect();
}
Program: 38818
Project: 38818
Buggy source:
public void createTables(){
  try {
    stmt.execute("String_Node_Str" + xAuthSettings.tblAccount + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    stmt.execute("String_Node_Str" + xAuthSettings.tblSession + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ xAuthSettings.tblAccount+ "String_Node_Str"+ "String_Node_Str");
    stmt.execute("String_Node_Str" + xAuthSettings.tblLocation + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    stmt.execute("String_Node_Str" + xAuthSettings.tblStrike + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    stmt.execute("String_Node_Str" + xAuthSettings.tblInventory + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str",e);
  }
}

Fixed version (ground truth):
public void createTables(){
  if (!isConnected())   connect();
  try {
    stmt.execute("String_Node_Str" + xAuthSettings.tblAccount + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    stmt.execute("String_Node_Str" + xAuthSettings.tblSession + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ xAuthSettings.tblAccount+ "String_Node_Str"+ "String_Node_Str");
    stmt.execute("String_Node_Str" + xAuthSettings.tblLocation + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    stmt.execute("String_Node_Str" + xAuthSettings.tblStrike + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    stmt.execute("String_Node_Str" + xAuthSettings.tblInventory + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str",e);
  }
}
Program: 38819
Project: 38819
Buggy source:
public void runStartupTasks(){
  createTables();
  loadTeleLocations();
  String sql;
  if (xAuthSettings.datasource.equals("String_Node_Str")) {
    sql="String_Node_Str" + xAuthSettings.tblSession + "String_Node_Str"+ "String_Node_Str"+ xAuthSettings.sessionLength+ "String_Node_Str";
  }
 else {
    sql="String_Node_Str" + xAuthSettings.tblSession + "String_Node_Str"+ "String_Node_Str"+ xAuthSettings.sessionLength+ "String_Node_Str";
  }
  try {
    stmt.executeUpdate(sql);
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str",e);
  }
}

Fixed version (ground truth):
public void runStartupTasks(){
  createTables();
  loadTeleLocations();
  String sql;
  if (xAuthSettings.datasource.equals("String_Node_Str")) {
    sql="String_Node_Str" + xAuthSettings.tblSession + "String_Node_Str"+ "String_Node_Str"+ xAuthSettings.sessionLength+ "String_Node_Str";
  }
 else {
    sql="String_Node_Str" + xAuthSettings.tblSession + "String_Node_Str"+ "String_Node_Str"+ xAuthSettings.sessionLength+ "String_Node_Str";
  }
  if (!isConnected())   connect();
  try {
    stmt.executeUpdate(sql);
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str",e);
  }
}
Program: 38820
Project: 38820
Buggy source:
public void printStats(){
  try {
    rs=stmt.executeQuery("String_Node_Str" + "String_Node_Str" + xAuthSettings.tblAccount + "String_Node_Str"+ "String_Node_Str"+ xAuthSettings.tblSession+ "String_Node_Str");
    if (rs.next())     xAuthLog.info("String_Node_Str" + rs.getInt("String_Node_Str") + "String_Node_Str"+ rs.getInt("String_Node_Str"));
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str",e);
  }
}

Fixed version (ground truth):
public void printStats(){
  if (!isConnected())   connect();
  try {
    rs=stmt.executeQuery("String_Node_Str" + "String_Node_Str" + xAuthSettings.tblAccount + "String_Node_Str"+ "String_Node_Str"+ xAuthSettings.tblSession+ "String_Node_Str");
    if (rs.next())     xAuthLog.info("String_Node_Str" + rs.getInt("String_Node_Str") + "String_Node_Str"+ rs.getInt("String_Node_Str"));
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str",e);
  }
}
Program: 38821
Project: 38821
Buggy source:
public void insertTeleLocation(TeleLocation teleLocation){
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + xAuthSettings.tblLocation + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    prepStmt.setString(1,teleLocation.getWorldName());
    prepStmt.setDouble(2,teleLocation.getX());
    prepStmt.setDouble(3,teleLocation.getY());
    prepStmt.setDouble(4,teleLocation.getZ());
    prepStmt.setFloat(5,teleLocation.getYaw());
    prepStmt.setFloat(6,teleLocation.getPitch());
    prepStmt.executeUpdate();
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + teleLocation.getWorldName(),e);
  }
}

Fixed version (ground truth):
public void insertTeleLocation(TeleLocation teleLocation){
  if (!isConnected())   connect();
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + xAuthSettings.tblLocation + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    prepStmt.setString(1,teleLocation.getWorldName());
    prepStmt.setDouble(2,teleLocation.getX());
    prepStmt.setDouble(3,teleLocation.getY());
    prepStmt.setDouble(4,teleLocation.getZ());
    prepStmt.setFloat(5,teleLocation.getYaw());
    prepStmt.setFloat(6,teleLocation.getPitch());
    prepStmt.executeUpdate();
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + teleLocation.getWorldName(),e);
  }
}
Program: 38822
Project: 38822
Buggy source:
public void deleteSession(xAuthPlayer xPlayer){
  Session session=xPlayer.getSession();
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + xAuthSettings.tblSession + "String_Node_Str"+ "String_Node_Str");
    prepStmt.setInt(1,session.getAccountId());
    prepStmt.executeUpdate();
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + xPlayer.getPlayerName(),e);
  }
  xPlayer.setSession(null);
}

Fixed version (ground truth):
public void deleteSession(xAuthPlayer xPlayer){
  if (!isConnected())   connect();
  Session session=xPlayer.getSession();
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + xAuthSettings.tblSession + "String_Node_Str"+ "String_Node_Str");
    prepStmt.setInt(1,session.getAccountId());
    prepStmt.executeUpdate();
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + xPlayer.getPlayerName(),e);
  }
  xPlayer.setSession(null);
}
Program: 38823
Project: 38823
Buggy source:
public xAuthPlayer reloadPlayer(xAuthPlayer xPlayer){
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + "String_Node_Str" + xAuthSettings.tblAccount + "String_Node_Str"+ "String_Node_Str"+ xAuthSettings.tblSession+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    prepStmt.setString(1,xPlayer.getPlayerName());
    rs=prepStmt.executeQuery();
    if (rs.next()) {
      xPlayer.setAccount(buildAccount(rs));
      xPlayer.setSession(buildSession(rs));
    }
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + xPlayer.getPlayerName(),e);
  }
  return xPlayer;
}

Fixed version (ground truth):
public xAuthPlayer reloadPlayer(xAuthPlayer xPlayer){
  if (!isConnected())   connect();
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + "String_Node_Str" + xAuthSettings.tblAccount + "String_Node_Str"+ "String_Node_Str"+ xAuthSettings.tblSession+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    prepStmt.setString(1,xPlayer.getPlayerName());
    rs=prepStmt.executeQuery();
    if (rs.next()) {
      xPlayer.setAccount(buildAccount(rs));
      xPlayer.setSession(buildSession(rs));
    }
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + xPlayer.getPlayerName(),e);
  }
  return xPlayer;
}
Program: 38824
Project: 38824
Buggy source:
public void deleteStrikeBan(StrikeBan ban){
  try {
    stmt=connection.prepareStatement("String_Node_Str" + xAuthSettings.tblStrike + "String_Node_Str"+ "String_Node_Str");
    prepStmt.setString(1,ban.getHost());
    prepStmt.executeUpdate();
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + ban.getHost(),e);
  }
}

Fixed version (ground truth):
public void deleteStrikeBan(StrikeBan ban){
  if (!isConnected())   connect();
  try {
    stmt=connection.prepareStatement("String_Node_Str" + xAuthSettings.tblStrike + "String_Node_Str"+ "String_Node_Str");
    prepStmt.setString(1,ban.getHost());
    prepStmt.executeUpdate();
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + ban.getHost(),e);
  }
}
Program: 38825
Project: 38825
Buggy source:
public int getActive(String playerName){
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + "String_Node_Str" + xAuthSettings.tblAccount + "String_Node_Str"+ "String_Node_Str");
    prepStmt.setString(1,playerName);
    rs=prepStmt.executeQuery();
    if (rs.next())     return rs.getInt("String_Node_Str");
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + playerName,e);
  }
  return 0;
}

Fixed version (ground truth):
public int getActive(String playerName){
  if (!isConnected())   connect();
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + "String_Node_Str" + xAuthSettings.tblAccount + "String_Node_Str"+ "String_Node_Str");
    prepStmt.setString(1,playerName);
    rs=prepStmt.executeQuery();
    if (rs.next())     return rs.getInt("String_Node_Str");
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + playerName,e);
  }
  return 0;
}
Program: 38826
Project: 38826
Buggy source:
public void deleteTeleLocation(TeleLocation teleLocation){
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + xAuthSettings.tblLocation + "String_Node_Str"+ "String_Node_Str");
    prepStmt.setString(1,teleLocation.getWorldName());
    prepStmt.executeUpdate();
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + teleLocation.getWorldName(),e);
  }
}

Fixed version (ground truth):
public void deleteTeleLocation(TeleLocation teleLocation){
  if (!isConnected())   connect();
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + xAuthSettings.tblLocation + "String_Node_Str"+ "String_Node_Str");
    prepStmt.setString(1,teleLocation.getWorldName());
    prepStmt.executeUpdate();
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + teleLocation.getWorldName(),e);
  }
}
Program: 38828
Project: 38828
Buggy source:
public void onPlayerMove(PlayerMoveEvent event){
  if (event.isCancelled())   return;
  Player player=event.getPlayer();
  xAuthPlayer xPlayer=plugin.getDataManager().getPlayer(player.getName());
  if (xPlayer.isGuest()) {
    event.setTo(plugin.getLocationToTeleport(player.getWorld()));
    if (xPlayer.canNotify())     xPlayer.sendIllegalActionNotice();
  }
}

Fixed version (ground truth):
public void onPlayerMove(PlayerMoveEvent event){
  if (event.isCancelled())   return;
  Player player=event.getPlayer();
  xAuthPlayer xPlayer=plugin.getDataManager().getPlayer(player.getName());
  if (xPlayer.isGuest()) {
    if (xAuthSettings.protectLoc)     event.setTo(plugin.getLocationToTeleport(player.getWorld()));
 else     event.setTo(xPlayer.getLocation());
    if (xPlayer.canNotify())     xPlayer.sendIllegalActionNotice();
  }
}
Program: 38829
Project: 38829
Buggy source:
public void run(){
  player.kickPlayer(xAuthMessages.get("String_Node_Str",player,null));
}

Fixed version (ground truth):
public void run(){
  if (player.getHealth() > 0)   xPlayer.setLocation(player.getLocation());
  if (xAuthSettings.protectLoc)   player.teleport(getLocationToTeleport(player.getWorld()));
}
Program: 38831
Project: 38831
Buggy source:
public void protect(xAuthPlayer xPlayer){
  Player player=xPlayer.getPlayer();
  PlayerInventory playerInv=player.getInventory();
  DbUtil.insertInventory(xPlayer);
  playerInv.clear();
  playerInv.setHelmet(null);
  playerInv.setChestplate(null);
  playerInv.setLeggings(null);
  playerInv.setBoots(null);
  player.saveData();
  if (player.getHealth() > 0)   xPlayer.setLocation(player.getLocation());
  if (xAuthSettings.protectLoc)   player.teleport(getLocationToTeleport(player.getWorld()));
}

Fixed version (ground truth):
public void protect(final xAuthPlayer xPlayer){
  final Player player=xPlayer.getPlayer();
  PlayerInventory playerInv=player.getInventory();
  DbUtil.insertInventory(xPlayer);
  playerInv.clear();
  playerInv.setHelmet(null);
  playerInv.setChestplate(null);
  playerInv.setLeggings(null);
  playerInv.setBoots(null);
  player.saveData();
  getServer().getScheduler().scheduleAsyncDelayedTask(this,new Runnable(){
    public void run(){
      if (player.getHealth() > 0)       xPlayer.setLocation(player.getLocation());
      if (xAuthSettings.protectLoc)       player.teleport(getLocationToTeleport(player.getWorld()));
    }
  }
,1);
}
Program: 38832
Project: 38832
Buggy source:
public void deleteStrikeBan(StrikeBan ban){
  if (!isConnected())   connect();
  try {
    stmt=connection.prepareStatement("String_Node_Str" + xAuthSettings.tblStrike + "String_Node_Str"+ "String_Node_Str");
    prepStmt.setString(1,ban.getHost());
    prepStmt.executeUpdate();
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + ban.getHost(),e);
  }
}

Fixed version (ground truth):
public void deleteStrikeBan(StrikeBan ban){
  if (!isConnected())   connect();
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + xAuthSettings.tblStrike + "String_Node_Str"+ "String_Node_Str");
    prepStmt.setString(1,ban.getHost());
    prepStmt.executeUpdate();
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + ban.getHost(),e);
  }
}
Program: 38833
Project: 38833
Buggy source:
private void apply(PsiElement element){
  remove();
  _editor=FileEditorManager.getInstance(_project).getSelectedTextEditor();
  if (_editor == null) {
    debug("String_Node_Str");
    return;
  }
  if (element instanceof PsiWhiteSpace && isWhiteSpaceFiltered())   return;
  if (isHighlightOn() && isElementInEditor(_editor,element)) {
    TextRange textRange=element.getTextRange();
    debug("String_Node_Str" + textRange);
    _highlighter=_editor.getMarkupModel().addRangeHighlighter(textRange.getStartOffset(),textRange.getEndOffset(),PsiViewerConstants.PSIVIEWER_HIGHLIGHT_LAYER,_textAttributes,HighlighterTargetArea.EXACT_RANGE);
  }
}

Fixed version (ground truth):
private void apply(PsiElement element){
  remove();
  _editor=FileEditorManager.getInstance(_project).getSelectedTextEditor();
  if (_editor == null) {
    debug("String_Node_Str");
    return;
  }
  if (element instanceof PsiWhiteSpace && isWhiteSpaceFiltered())   return;
  if (isHighlightOn() && isElementInEditor(_editor,element)) {
    TextRange textRange=element.getTextRange();
    debug("String_Node_Str" + textRange);
    final int docTextLength=_editor.getDocument().getTextLength();
    _highlighter=_editor.getMarkupModel().addRangeHighlighter(textRange.getStartOffset(),Math.min(textRange.getEndOffset(),docTextLength),PsiViewerConstants.PSIVIEWER_HIGHLIGHT_LAYER,_textAttributes,HighlighterTargetArea.EXACT_RANGE);
  }
}
Program: 38834
Project: 38834
Buggy source:
public void selectionChanged(@NotNull FileEditorManagerEvent event){
  debug("String_Node_Str" + event.toString());
  if (event.getNewFile() == null)   return;
  Editor newEditor=event.getManager().getSelectedTextEditor();
  if (_currentEditor != newEditor)   _currentEditor.getCaretModel().removeCaretListener(this);
  _viewer.selectElementAtCaret();
  _currentEditor.getCaretModel().addCaretListener(this);
}

Fixed version (ground truth):
public void selectionChanged(@NotNull FileEditorManagerEvent event){
  debug("String_Node_Str" + event.toString());
  if (event.getNewFile() == null)   return;
  Editor newEditor=event.getManager().getSelectedTextEditor();
  if (_currentEditor != newEditor)   _currentEditor.getCaretModel().removeCaretListener(this);
  _viewer.selectElementAtCaret();
  if (newEditor != null)   _currentEditor=newEditor;
  _currentEditor.getCaretModel().addCaretListener(this);
}
Program: 38835
Project: 38835
Buggy source:
public PsiViewerTreeCellRenderer(){
  setOpaque(false);
  _elementVisitor=new ElementVisitor();
}

Fixed version (ground truth):
public PsiViewerTreeCellRenderer(){
  setOpaque(false);
}
Program: 38836
Project: 38836
Buggy source:
private String truncate(String text){
  if (text.length() > MAX_TEXT_LENGTH)   return text.substring(0,MAX_TEXT_LENGTH).trim() + "String_Node_Str";
 else   return text;
}

Fixed version (ground truth):
private String truncate(String text){
  if (text.length() > 80)   return text.substring(0,80).trim() + "String_Node_Str";
 else   return text;
}
Program: 38837
Project: 38837
Buggy source:
public Component getTreeCellRendererComponent(JTree tree,Object value,boolean isSelected,boolean isExpanded,boolean isLeaf,int row,boolean hasFocus){
  super.getTreeCellRendererComponent(tree,value,isSelected,isExpanded,isLeaf,row,hasFocus);
  setIcon(IconCache.DEFAULT_ICON);
  PsiElement psiElement=(PsiElement)value;
  psiElement.accept(_elementVisitor);
  return this;
}

Fixed version (ground truth):
public Component getTreeCellRendererComponent(JTree tree,Object value,boolean isSelected,boolean isExpanded,boolean isLeaf,int row,boolean hasFocus){
  super.getTreeCellRendererComponent(tree,value,isSelected,isExpanded,isLeaf,row,hasFocus);
  setIcon(IconCache.DEFAULT_ICON);
  PsiElement psiElement=(PsiElement)value;
  psiElement.accept(_elementVisitor);
  psiElement.accept(_elementVisitorXml);
  psiElement.accept(_elementVisitorJava);
  return this;
}
Program: 38838
Project: 38838
Buggy source:
public void visitReferenceExpression(PsiReferenceExpression psiReferenceExpression){
}

Fixed version (ground truth):
public void visitReferenceExpression(PsiReferenceExpression psireferenceexpression){
}
Program: 38839
Project: 38839
Buggy source:
/** 
 * cat out the time_in_state as root as an alternative to reading the file. THis is necesary for ROMs who have blocked user/group read access to the file due to some bug 
 */
private List<CpuState> getStatesAsRoot(){
  Process process=null;
  DataOutputStream out=null;
  InputStreamReader inReader=null;
  try {
    process=Runtime.getRuntime().exec("String_Node_Str");
    out=new DataOutputStream(process.getOutputStream());
    out.writeChars("String_Node_Str" + TIME_IN_STATE_PATH + "String_Node_Str");
    out.flush();
    inReader=new InputStreamReader(process.getInputStream());
    BufferedReader br=new BufferedReader(inReader);
    readInStates(br);
  }
 catch (  Exception e) {
    Log.d("String_Node_Str","String_Node_Str");
    Log.e("String_Node_Str",e.getMessage());
  }
 finally {
    try {
      out.close();
      inReader.close();
      process.destroy();
    }
 catch (    Exception e) {
      Log.e("String_Node_Str",e.getMessage());
    }
  }
  return mStates;
}

Fixed version (ground truth):
/** 
 * cat out the time_in_state as root as an alternative to reading the file. THis is necesary for ROMs who have blocked user/group read access to the file due to some bug 
 */
private List<CpuState> getStatesAsRoot(){
  Process process=null;
  DataOutputStream out=null;
  InputStreamReader inReader=null;
  try {
    process=Runtime.getRuntime().exec("String_Node_Str");
    out=new DataOutputStream(process.getOutputStream());
    out.writeChars("String_Node_Str" + TIME_IN_STATE_PATH + "String_Node_Str");
    out.flush();
    inReader=new InputStreamReader(process.getInputStream());
    BufferedReader br=new BufferedReader(inReader);
    readInStates(br);
  }
 catch (  Exception e) {
    Log.d("String_Node_Str","String_Node_Str");
    Log.e("String_Node_Str",e.getMessage());
  }
 finally {
    try {
      out.close();
      inReader.close();
      process.destroy();
    }
 catch (    Exception e) {
      Log.e("String_Node_Str",e.getMessage());
    }
  }
  if (mStates.size() == 0)   return null;
  return mStates;
}
Program: 38840
Project: 38840
Buggy source:
/** 
 * update the view 
 */
public void updateView(){
  mUiStatesView.removeAllViews();
  List<String> extraStates=new ArrayList<String>();
  for (  CpuState state : mApp.getStates()) {
    if (state.duration > 0) {
      generateStateRow(state,mUiStatesView);
    }
 else {
      extraStates.add(state.freq / 1000 + "String_Node_Str");
    }
  }
  if (mApp.getStates().size() == 0) {
    mUiStatesWarning.setVisibility(View.VISIBLE);
  }
  if (extraStates.size() > 0) {
    int n=0;
    String str="String_Node_Str";
    for (    String s : extraStates) {
      if (n++ > 0)       str+="String_Node_Str";
      str+=s;
    }
    mUiAdditionalStates.setVisibility(View.VISIBLE);
    mUiHeaderAdditionalStates.setVisibility(View.VISIBLE);
    mUiAdditionalStates.setText(str);
  }
  mUiKernelString.setText(mApp.getKernelString());
}

Fixed version (ground truth):
/** 
 * update the view 
 */
public void updateView(){
  mUiStatesView.removeAllViews();
  List<String> extraStates=new ArrayList<String>();
  for (  CpuState state : mApp.getStates()) {
    if (state.duration > 0) {
      generateStateRow(state,mUiStatesView);
    }
 else {
      extraStates.add(state.freq / 1000 + "String_Node_Str");
    }
  }
  if (mApp.getStates().size() == 0) {
    mUiStatesWarning.setVisibility(View.VISIBLE);
  }
  if (extraStates.size() > 0) {
    int n=0;
    String str="String_Node_Str";
    for (    String s : extraStates) {
      if (n++ > 0)       str+="String_Node_Str";
      str+=s;
    }
    mUiAdditionalStates.setVisibility(View.VISIBLE);
    mUiHeaderAdditionalStates.setVisibility(View.VISIBLE);
    mUiAdditionalStates.setText(str);
  }
 else {
    mUiAdditionalStates.setVisibility(View.GONE);
    mUiHeaderAdditionalStates.setVisibility(View.GONE);
  }
  mUiKernelString.setText(mApp.getKernelString());
}
Program: 38841
Project: 38841
Buggy source:
/** 
 * access state list 
 */
public List<CpuState> getStates(){
  List<CpuState> ret=new ArrayList<CpuState>();
  for (  CpuState state : mStates) {
    int dur=state.duration;
    if (mOffsets.containsKey(state.freq)) {
      dur=state.duration - mOffsets.get(state.freq);
    }
    ret.add(new CpuState(state.freq,dur));
  }
  return ret;
}

Fixed version (ground truth):
/** 
 * access state list 
 */
public List<CpuState> getStates(){
  List<CpuState> ret=new ArrayList<CpuState>();
  for (  CpuState state : mStates) {
    int dur=state.duration;
    if (mOffsets.containsKey(state.freq)) {
      dur=state.duration - mOffsets.get(state.freq);
      if (dur < 0)       dur=state.duration;
    }
    ret.add(new CpuState(state.freq,dur));
  }
  return ret;
}
Program: 38842
Project: 38842
Buggy source:
/** 
 * spit out a view representing a cpustate so we can cram it into a ScrollView 
 */
private View generateStateRow(CpuState state,ViewGroup parent){
  LayoutInflater inf=LayoutInflater.from((Context)mApp);
  LinearLayout theRow=(LinearLayout)inf.inflate(R.layout.state_row,parent,false);
  float per=(float)state.duration * 100 / mApp.getTotalStateTime();
  String sFreq=state.freq / 1000 + "String_Node_Str";
  String sPer=(int)per + "String_Node_Str";
  int h=(int)Math.floor(state.duration / 6000);
  int m=(state.duration / 100) % 60;
  String sDur;
  if (m < 10)   sDur=h + "String_Node_Str" + m;
 else   sDur=h + "String_Node_Str" + m;
  TextView freqText=(TextView)theRow.findViewById(R.id.ui_freq_text);
  TextView durText=(TextView)theRow.findViewById(R.id.ui_duration_text);
  TextView perText=(TextView)theRow.findViewById(R.id.ui_percentage_text);
  ProgressBar bar=(ProgressBar)theRow.findViewById(R.id.ui_bar);
  freqText.setText(sFreq);
  perText.setText(sPer);
  durText.setText(sDur);
  bar.setProgress((int)per);
  parent.addView(theRow);
  return theRow;
}

Fixed version (ground truth):
/** 
 * spit out a view representing a cpustate so we can cram it into a ScrollView 
 */
private View generateStateRow(CpuState state,ViewGroup parent){
  LayoutInflater inf=LayoutInflater.from((Context)mApp);
  LinearLayout theRow=(LinearLayout)inf.inflate(R.layout.state_row,parent,false);
  float per=(float)state.duration * 100 / mApp.getTotalStateTime();
  String sFreq=state.freq / 1000 + "String_Node_Str";
  String sPer=(int)per + "String_Node_Str";
  int tSec=state.duration / 100;
  int h=(int)Math.floor(tSec / (60 * 60));
  int m=(int)Math.floor((tSec - h * 60 * 60) / 60);
  int s=(state.duration / 100) % 60;
  String sDur;
  sDur=h + "String_Node_Str";
  if (m < 10)   sDur+="String_Node_Str";
  sDur+=m + "String_Node_Str";
  if (s < 10)   sDur+="String_Node_Str";
  sDur+=s;
  TextView freqText=(TextView)theRow.findViewById(R.id.ui_freq_text);
  TextView durText=(TextView)theRow.findViewById(R.id.ui_duration_text);
  TextView perText=(TextView)theRow.findViewById(R.id.ui_percentage_text);
  ProgressBar bar=(ProgressBar)theRow.findViewById(R.id.ui_bar);
  freqText.setText(sFreq);
  perText.setText(sPer);
  durText.setText(sDur);
  bar.setProgress((int)per);
  parent.addView(theRow);
  return theRow;
}
Program: 38843
Project: 38843
Buggy source:
@Test public void canDecode2(){
  AISMessage aisMessage=AISMessage.create(NMEAMessage.fromString("String_Node_Str"));
  System.out.println(aisMessage.toString());
  assertEquals(AISMessageType.AidToNavigationReport,aisMessage.getMessageType());
  assertEquals((Integer)0,aisMessage.getRepeatIndicator());
  AidToNavigationReport message=(AidToNavigationReport)aisMessage;
  assertEquals(MMSI.valueOf(995036021),message.getSourceMmsi());
  assertEquals(AidType.BeaconSpecialMark,message.getAidType());
  assertEquals(false,message.getAssignedMode());
  assertEquals("String_Node_Str",message.getName());
  assertEquals(null,message.getNameExtension());
  assertEquals(false,message.getOffPosition());
  assertEquals(Integer.valueOf(60),message.getSecond());
  assertEquals(Integer.valueOf(0),message.getToBow());
  assertEquals(Integer.valueOf(0),message.getToPort());
  assertEquals(Integer.valueOf(0),message.getToStern());
  assertEquals(Integer.valueOf(0),message.getToStarboard());
  assertEquals(true,message.getVirtualAid());
  assertEquals(false,message.getPositionAccurate());
  assertEquals(Float.valueOf(-23.917383f),message.getLatitude());
  assertEquals(Float.valueOf(151.49791f),message.getLongitude());
  assertEquals(PositionFixingDevice.Surveyed,message.getPositionFixingDevice());
  assertFalse(message.getRaimFlag());
}

Fixed version (ground truth):
@Test public void canDecode2(){
  AISMessage aisMessage=AISMessage.create(NMEAMessage.fromString("String_Node_Str"));
  System.out.println(aisMessage.toString());
  assertEquals(AISMessageType.AidToNavigationReport,aisMessage.getMessageType());
  assertEquals((Integer)0,aisMessage.getRepeatIndicator());
  AidToNavigationReport message=(AidToNavigationReport)aisMessage;
  assertEquals(MMSI.valueOf(995036021),message.getSourceMmsi());
  assertEquals(AidType.BeaconSpecialMark,message.getAidType());
  assertEquals(false,message.getAssignedMode());
  assertEquals("String_Node_Str",message.getName());
  assertEquals(null,message.getNameExtension());
  assertEquals(false,message.getOffPosition());
  assertEquals(Integer.valueOf(60),message.getSecond());
  assertEquals(Integer.valueOf(0),message.getToBow());
  assertEquals(Integer.valueOf(0),message.getToPort());
  assertEquals(Integer.valueOf(0),message.getToStern());
  assertEquals(Integer.valueOf(0),message.getToStarboard());
  assertEquals(true,message.getVirtualAid());
  assertEquals(false,message.getPositionAccurate());
  assertEquals(Float.valueOf(-23.917385f),message.getLatitude());
  assertEquals(Float.valueOf(151.49791f),message.getLongitude());
  assertEquals(PositionFixingDevice.Surveyed,message.getPositionFixingDevice());
  assertFalse(message.getRaimFlag());
}
Program: 38845
Project: 38845
Buggy source:
@Test public void canDecode1(){
  AISMessage aisMessage=AISMessage.create(NMEAMessage.fromString("String_Node_Str"));
  System.out.println(aisMessage.toString());
  assertEquals(AISMessageType.AidToNavigationReport,aisMessage.getMessageType());
  assertEquals((Integer)0,aisMessage.getRepeatIndicator());
  AidToNavigationReport message=(AidToNavigationReport)aisMessage;
  assertEquals(MMSI.valueOf(995036019),message.getSourceMmsi());
  assertEquals(AidType.BeaconSpecialMark,message.getAidType());
  assertEquals(false,message.getAssignedMode());
  assertEquals("String_Node_Str",message.getName());
  assertEquals(null,message.getNameExtension());
  assertEquals(false,message.getOffPosition());
  assertEquals(Integer.valueOf(60),message.getSecond());
  assertEquals(Integer.valueOf(0),message.getToBow());
  assertEquals(Integer.valueOf(0),message.getToPort());
  assertEquals(Integer.valueOf(0),message.getToStern());
  assertEquals(Integer.valueOf(0),message.getToStarboard());
  assertEquals(true,message.getVirtualAid());
  assertEquals(false,message.getPositionAccurate());
  assertEquals(Float.valueOf(-23.936691f),message.getLatitude());
  assertEquals(Float.valueOf(151.44344f),message.getLongitude());
  assertEquals(PositionFixingDevice.Surveyed,message.getPositionFixingDevice());
  assertFalse(message.getRaimFlag());
}

Fixed version (ground truth):
@Test public void canDecode1(){
  AISMessage aisMessage=AISMessage.create(NMEAMessage.fromString("String_Node_Str"));
  System.out.println(aisMessage.toString());
  assertEquals(AISMessageType.AidToNavigationReport,aisMessage.getMessageType());
  assertEquals((Integer)0,aisMessage.getRepeatIndicator());
  AidToNavigationReport message=(AidToNavigationReport)aisMessage;
  assertEquals(MMSI.valueOf(995036019),message.getSourceMmsi());
  assertEquals(AidType.BeaconSpecialMark,message.getAidType());
  assertEquals(false,message.getAssignedMode());
  assertEquals("String_Node_Str",message.getName());
  assertEquals(null,message.getNameExtension());
  assertEquals(false,message.getOffPosition());
  assertEquals(Integer.valueOf(60),message.getSecond());
  assertEquals(Integer.valueOf(0),message.getToBow());
  assertEquals(Integer.valueOf(0),message.getToPort());
  assertEquals(Integer.valueOf(0),message.getToStern());
  assertEquals(Integer.valueOf(0),message.getToStarboard());
  assertEquals(true,message.getVirtualAid());
  assertEquals(false,message.getPositionAccurate());
  assertEquals(Float.valueOf(-23.936693f),message.getLatitude());
  assertEquals(Float.valueOf(151.44344f),message.getLongitude());
  assertEquals(PositionFixingDevice.Surveyed,message.getPositionFixingDevice());
  assertFalse(message.getRaimFlag());
}
Program: 38846
Project: 38846
Buggy source:
@Test public void canDecode2(){
  AISMessage aisMessage=AISMessage.create(NMEAMessage.fromString("String_Node_Str"));
  System.out.println(aisMessage.toString());
  assertEquals(AISMessageType.LongRangeBroadcastMessage,aisMessage.getMessageType());
  assertEquals((Integer)0,aisMessage.getRepeatIndicator());
  assertEquals(MMSI.valueOf(357277000),aisMessage.getSourceMmsi());
  LongRangeBroadcastMessage message=(LongRangeBroadcastMessage)aisMessage;
  assertTrue(message.getPositionAccuracy());
  assertFalse(message.getRaim());
  assertEquals(NavigationStatus.Moored,message.getNavigationalStatus());
  assertEquals(Float.valueOf(176.18167f),message.getLongitude());
  assertEquals(Float.valueOf(-37.65167f),message.getLatitude());
  assertEquals(Float.valueOf(0f),message.getSpeedOverGround(),1e-5);
  assertEquals(Float.valueOf(11f),message.getCourseOverGround(),1e-5);
}

Fixed version (ground truth):
@Test public void canDecode2(){
  AISMessage aisMessage=AISMessage.create(NMEAMessage.fromString("String_Node_Str"));
  System.out.println(aisMessage.toString());
  assertEquals(AISMessageType.LongRangeBroadcastMessage,aisMessage.getMessageType());
  assertEquals((Integer)0,aisMessage.getRepeatIndicator());
  assertEquals(MMSI.valueOf(357277000),aisMessage.getSourceMmsi());
  LongRangeBroadcastMessage message=(LongRangeBroadcastMessage)aisMessage;
  assertTrue(message.getPositionAccuracy());
  assertFalse(message.getRaim());
  assertEquals(NavigationStatus.Moored,message.getNavigationalStatus());
  assertEquals(Float.valueOf(176.18167f),message.getLongitude());
  assertEquals(Float.valueOf(-37.65333f),message.getLatitude());
  assertEquals(Float.valueOf(0f),message.getSpeedOverGround(),1e-5);
  assertEquals(Float.valueOf(11f),message.getCourseOverGround(),1e-5);
}
Program: 38850
Project: 38850
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + "String_Node_Str" + getMessageType() + "String_Node_Str"+ getAccuracy()+ "String_Node_Str"+ getRaim()+ "String_Node_Str"+ getStatus()+ "String_Node_Str"+ getLongitude()+ "String_Node_Str"+ getLatitude()+ "String_Node_Str"+ getSpeed()+ "String_Node_Str"+ getCourse()+ "String_Node_Str"+ getGnss()+ "String_Node_Str"+ getSpare()+ "String_Node_Str"+ super.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + "String_Node_Str" + getMessageType() + "String_Node_Str"+ getPositionAccuracy()+ "String_Node_Str"+ getRaim()+ "String_Node_Str"+ getNavigationalStatus()+ "String_Node_Str"+ getLongitude()+ "String_Node_Str"+ getLatitude()+ "String_Node_Str"+ getSpeedOverGround()+ "String_Node_Str"+ getCourseOverGround()+ "String_Node_Str"+ getPositionLatency()+ "String_Node_Str"+ getSpare()+ "String_Node_Str"+ super.toString();
}
Program: 38851
Project: 38851
Buggy source:
public AddressedBinaryMessage(Integer repeatIndicator,MMSI sourceMmsi,Integer sequenceNumber,MMSI destinationMmsi,Boolean retransmit,Integer designatedAreaCode,Integer functionalId,String binaryData){
  super(AISMessageType.AddressedBinaryMessage,repeatIndicator,sourceMmsi);
  this.sequenceNumber=sequenceNumber;
  this.destinationMmsi=destinationMmsi;
  this.retransmit=retransmit;
  this.designatedAreaCode=designatedAreaCode;
  this.functionalId=functionalId;
  this.binaryData=binaryData;
}

Fixed version (ground truth):
public AddressedBinaryMessage(Integer repeatIndicator,MMSI sourceMmsi,Integer sequenceNumber,MMSI destinationMmsi,Boolean retransmit,int spare,Integer designatedAreaCode,Integer functionalId,String binaryData){
  super(AISMessageType.AddressedBinaryMessage,repeatIndicator,sourceMmsi);
  this.sequenceNumber=sequenceNumber;
  this.destinationMmsi=destinationMmsi;
  this.retransmit=retransmit;
  this.spare=spare;
  this.designatedAreaCode=designatedAreaCode;
  this.functionalId=functionalId;
  this.binaryData=binaryData;
}
Program: 38852
Project: 38852
Buggy source:
public static AddressedBinaryMessage fromEncodedMessage(EncodedAISMessage encodedMessage){
  if (!encodedMessage.isValid())   throw new InvalidEncodedMessage(encodedMessage);
  if (!encodedMessage.getMessageType().equals(AISMessageType.AddressedBinaryMessage))   throw new UnsupportedMessageType(encodedMessage.getMessageType().getCode());
  Integer repeatIndicator=DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(6,8));
  MMSI sourceMmsi=MMSI.valueOf(DecoderImpl.convertToUnsignedLong(encodedMessage.getBits(8,38)));
  Integer sequenceNumber=DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(38,40));
  MMSI destinationMmsi=MMSI.valueOf(DecoderImpl.convertToUnsignedLong(encodedMessage.getBits(40,70)));
  Boolean retransmit=DecoderImpl.convertToBoolean(encodedMessage.getBits(70,71));
  Integer designatedAreaCode=DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(72,82));
  Integer functionalId=DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(82,88));
  String binaryData=DecoderImpl.convertToBitString(encodedMessage.getBits(88,1009));
  return new AddressedBinaryMessage(repeatIndicator,sourceMmsi,sequenceNumber,destinationMmsi,retransmit,designatedAreaCode,functionalId,binaryData);
}

Fixed version (ground truth):
public static AddressedBinaryMessage fromEncodedMessage(EncodedAISMessage encodedMessage){
  if (!encodedMessage.isValid())   throw new InvalidEncodedMessage(encodedMessage);
  if (!encodedMessage.getMessageType().equals(AISMessageType.AddressedBinaryMessage))   throw new UnsupportedMessageType(encodedMessage.getMessageType().getCode());
  Integer repeatIndicator=DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(6,8));
  MMSI sourceMmsi=MMSI.valueOf(DecoderImpl.convertToUnsignedLong(encodedMessage.getBits(8,38)));
  Integer sequenceNumber=DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(38,40));
  MMSI destinationMmsi=MMSI.valueOf(DecoderImpl.convertToUnsignedLong(encodedMessage.getBits(40,70)));
  Boolean retransmit=DecoderImpl.convertToBoolean(encodedMessage.getBits(70,71));
  int spare=DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(71,72));
  Integer designatedAreaCode=DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(72,82));
  Integer functionalId=DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(82,88));
  String binaryData=DecoderImpl.convertToBitString(encodedMessage.getBits(88,encodedMessage.getNumberOfBits()));
  return new AddressedBinaryMessage(repeatIndicator,sourceMmsi,sequenceNumber,destinationMmsi,retransmit,spare,designatedAreaCode,functionalId,binaryData);
}
Program: 38853
Project: 38853
Buggy source:
public static AddressedSafetyRelatedMessage fromEncodedMessage(EncodedAISMessage encodedMessage){
  if (!encodedMessage.isValid())   throw new InvalidEncodedMessage(encodedMessage);
  if (!encodedMessage.getMessageType().equals(AISMessageType.AddressedSafetyRelatedMessage))   throw new UnsupportedMessageType(encodedMessage.getMessageType().getCode());
  Integer repeatIndicator=DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(6,8));
  MMSI sourceMmsi=MMSI.valueOf(DecoderImpl.convertToUnsignedLong(encodedMessage.getBits(8,38)));
  Integer sequenceNumber=DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(38,40));
  MMSI destinationMmsi=MMSI.valueOf(DecoderImpl.convertToUnsignedLong(encodedMessage.getBits(40,70)));
  Boolean retransmit=DecoderImpl.convertToBoolean(encodedMessage.getBits(70,71));
  String text=DecoderImpl.convertToString(encodedMessage.getBits(70,1009));
  return new AddressedSafetyRelatedMessage(repeatIndicator,sourceMmsi,sequenceNumber,destinationMmsi,retransmit,text);
}

Fixed version (ground truth):
public static AddressedSafetyRelatedMessage fromEncodedMessage(EncodedAISMessage encodedMessage){
  if (!encodedMessage.isValid())   throw new InvalidEncodedMessage(encodedMessage);
  if (!encodedMessage.getMessageType().equals(AISMessageType.AddressedSafetyRelatedMessage))   throw new UnsupportedMessageType(encodedMessage.getMessageType().getCode());
  Integer repeatIndicator=DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(6,8));
  MMSI sourceMmsi=MMSI.valueOf(DecoderImpl.convertToUnsignedLong(encodedMessage.getBits(8,38)));
  Integer sequenceNumber=DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(38,40));
  MMSI destinationMmsi=MMSI.valueOf(DecoderImpl.convertToUnsignedLong(encodedMessage.getBits(40,70)));
  Boolean retransmit=DecoderImpl.convertToBoolean(encodedMessage.getBits(70,71));
  int spare=DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(71,72));
  int extraBitsOfChars=((encodedMessage.getNumberOfBits() - 72) / 6) * 6;
  String text=DecoderImpl.convertToString(encodedMessage.getBits(72,72 + extraBitsOfChars));
  return new AddressedSafetyRelatedMessage(repeatIndicator,sourceMmsi,sequenceNumber,destinationMmsi,retransmit,spare,text);
}
Program: 38854
Project: 38854
Buggy source:
public AddressedSafetyRelatedMessage(Integer repeatIndicator,MMSI sourceMmsi,Integer sequenceNumber,MMSI destinationMmsi,Boolean retransmit,String text){
  super(AISMessageType.AddressedSafetyRelatedMessage,repeatIndicator,sourceMmsi);
  this.sequenceNumber=sequenceNumber;
  this.destinationMmsi=destinationMmsi;
  this.retransmit=retransmit;
  this.text=text;
}

Fixed version (ground truth):
public AddressedSafetyRelatedMessage(Integer repeatIndicator,MMSI sourceMmsi,Integer sequenceNumber,MMSI destinationMmsi,Boolean retransmit,int spare,String text){
  super(AISMessageType.AddressedSafetyRelatedMessage,repeatIndicator,sourceMmsi);
  this.sequenceNumber=sequenceNumber;
  this.destinationMmsi=destinationMmsi;
  this.retransmit=retransmit;
  this.spare=spare;
  this.text=text;
}
Program: 38856
Project: 38856
Buggy source:
public AidToNavigationReport(Integer repeatIndicator,MMSI sourceMmsi,AidType aidType,String name,Boolean positionAccurate,Float latitude,Float longitude,Integer toBow,Integer toStern,Integer toStarboard,Integer toPort,PositionFixingDevice positionFixingDevice,Integer second,Boolean offPosition,String regionalUse,Boolean raimFlag,Boolean virtualAid,Boolean assignedMode,String nameExtension){
  super(AISMessageType.AidToNavigationReport,repeatIndicator,sourceMmsi);
  this.aidType=aidType;
  this.name=name;
  this.positionAccurate=positionAccurate;
  this.latitude=latitude;
  this.longitude=longitude;
  this.toBow=toBow;
  this.toStern=toStern;
  this.toStarboard=toStarboard;
  this.toPort=toPort;
  this.positionFixingDevice=positionFixingDevice;
  this.second=second;
  this.offPosition=offPosition;
  this.regionalUse=regionalUse;
  this.raimFlag=raimFlag;
  this.virtualAid=virtualAid;
  this.assignedMode=assignedMode;
  this.nameExtension=nameExtension;
}

Fixed version (ground truth):
public AidToNavigationReport(Integer repeatIndicator,MMSI sourceMmsi,AidType aidType,String name,Boolean positionAccurate,Float latitude,Float longitude,Integer toBow,Integer toStern,Integer toStarboard,Integer toPort,PositionFixingDevice positionFixingDevice,Integer second,Boolean offPosition,String regionalUse,Boolean raimFlag,Boolean virtualAid,Boolean assignedMode,int spare1,String nameExtension,int spare2){
  super(AISMessageType.AidToNavigationReport,repeatIndicator,sourceMmsi);
  this.aidType=aidType;
  this.name=name;
  this.positionAccurate=positionAccurate;
  this.latitude=latitude;
  this.longitude=longitude;
  this.toBow=toBow;
  this.toStern=toStern;
  this.toStarboard=toStarboard;
  this.toPort=toPort;
  this.positionFixingDevice=positionFixingDevice;
  this.second=second;
  this.offPosition=offPosition;
  this.regionalUse=regionalUse;
  this.raimFlag=raimFlag;
  this.virtualAid=virtualAid;
  this.assignedMode=assignedMode;
  this.spare1=spare1;
  this.nameExtension=nameExtension;
  this.spare2=spare2;
}
Program: 38857
Project: 38857
Buggy source:
public BinaryAcknowledge(Integer repeatIndicator,MMSI sourceMmsi,MMSI mmsi1,MMSI mmsi2,MMSI mmsi3,MMSI mmsi4){
  super(AISMessageType.BinaryAcknowledge,repeatIndicator,sourceMmsi);
  this.mmsi1=mmsi1;
  this.mmsi2=mmsi2;
  this.mmsi3=mmsi3;
  this.mmsi4=mmsi4;
}

Fixed version (ground truth):
public BinaryAcknowledge(Integer repeatIndicator,MMSI sourceMmsi,int spare,MMSI mmsi1,int sequence1,MMSI mmsi2,int sequence2,MMSI mmsi3,int sequence3,MMSI mmsi4,int sequence4,int numOfAcks){
  super(AISMessageType.BinaryAcknowledge,repeatIndicator,sourceMmsi);
  this.spare=spare;
  this.mmsi1=mmsi1;
  this.sequence1=sequence1;
  this.mmsi2=mmsi2;
  this.sequence2=sequence2;
  this.mmsi3=mmsi3;
  this.sequence3=sequence3;
  this.mmsi4=mmsi4;
  this.sequence4=sequence4;
  this.numOfAcks=numOfAcks;
}