Program: 7959
Project: 7959
Buggy source:
@Override public synchronized long incrementAtomicDirtily(byte[] row,byte[] column,long amount) throws OperationException {
  PreparedStatement ps=null;
  try {
    this.connection.setAutoCommit(false);
    ps=this.connection.prepareStatement("String_Node_Str" + "String_Node_Str" + this.quotedTableName + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    ps.setBytes(1,row);
    ps.setBytes(2,column);
    ResultSet result=ps.executeQuery();
    ps.close();
    ImmutablePair<Long,byte[]> latest=latest(result);
    long newAmount=amount;
    if (latest == null) {
      ps=this.connection.prepareStatement("String_Node_Str" + this.quotedTableName + "String_Node_Str");
      ps.setBytes(1,row);
      ps.setBytes(2,column);
      ps.setLong(3,TransactionOracle.DIRTY_WRITE_VERSION);
      ps.setInt(4,Type.VALUE.i);
      ps.setBytes(5,Bytes.toBytes(newAmount));
      ps.executeUpdate();
    }
 else {
      ps=this.connection.prepareStatement("String_Node_Str" + this.quotedTableName + "String_Node_Str"+ "String_Node_Str");
      newAmount=Bytes.toLong(latest.getSecond()) + amount;
      ps.setBytes(1,Bytes.toBytes(newAmount));
      ps.setBytes(2,row);
      ps.setBytes(3,column);
      ps.setLong(4,TransactionOracle.DIRTY_WRITE_VERSION);
      ps.executeUpdate();
    }
    this.connection.commit();
    return newAmount;
  }
 catch (  SQLException e) {
    throw createOperationException(e,"String_Node_Str");
  }
 finally {
    try {
      this.connection.setAutoCommit(true);
      if (ps != null) {
        ps.close();
      }
    }
 catch (    SQLException e) {
      throw createOperationException(e,"String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@Override public synchronized long incrementAtomicDirtily(byte[] row,byte[] column,long amount) throws OperationException {
  PreparedStatement ps=null;
  try {
    this.connection.setAutoCommit(false);
    ps=this.connection.prepareStatement("String_Node_Str" + "String_Node_Str" + this.quotedTableName + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    ps.setBytes(1,row);
    ps.setBytes(2,column);
    ResultSet result=ps.executeQuery();
    ps.close();
    ImmutablePair<Long,byte[]> latest=latest(result);
    long newAmount=amount;
    if (latest == null) {
      ps=this.connection.prepareStatement("String_Node_Str" + this.quotedTableName + "String_Node_Str"+ "String_Node_Str");
      ps.setBytes(1,row);
      ps.setBytes(2,column);
      ps.setLong(3,TransactionOracle.DIRTY_WRITE_VERSION);
      ps.setInt(4,Type.VALUE.i);
      ps.setBytes(5,Bytes.toBytes(newAmount));
      ps.executeUpdate();
    }
 else {
      ps=this.connection.prepareStatement("String_Node_Str" + this.quotedTableName + "String_Node_Str"+ "String_Node_Str");
      newAmount=Bytes.toLong(latest.getSecond()) + amount;
      ps.setBytes(1,Bytes.toBytes(newAmount));
      ps.setBytes(2,row);
      ps.setBytes(3,column);
      ps.setLong(4,TransactionOracle.DIRTY_WRITE_VERSION);
      ps.executeUpdate();
    }
    this.connection.commit();
    return newAmount;
  }
 catch (  SQLException e) {
    throw createOperationException(e,"String_Node_Str");
  }
 finally {
    try {
      this.connection.setAutoCommit(true);
      if (ps != null) {
        ps.close();
      }
    }
 catch (    SQLException e) {
      throw createOperationException(e,"String_Node_Str");
    }
  }
}