Program: 63413
Project: 63413
Buggy source:
public void testJtaDataSource() throws Exception {
  if (!shouldRunPureJdbcTests) {
    System.out.println("String_Node_Str");
    return;
  }
  if (!serverSession.getLogin().shouldUseExternalTransactionController()) {
    throw new RuntimeException("String_Node_Str");
  }
  System.out.println("String_Node_Str");
  TransactionManager mngr=((JTATransactionController)serverSession.getExternalTransactionController()).getTransactionManager();
  DataSource jtaDs=((JNDIConnector)serverSession.getLogin().getConnector()).getDataSource();
  Properties props=new Properties();
  props.setProperty(OracleConnection.PROXY_USER_NAME,System.getProperty("String_Node_Str"));
  mngr.begin();
  Connection conn=jtaDs.getConnection();
  OracleConnection oracleConn;
  if (conn instanceof OracleConnection) {
    oracleConn=(OracleConnection)conn;
  }
 else {
    oracleConn=(OracleConnection)serverSession.getServerPlatform().unwrapConnection(conn);
  }
  oracleConn.openProxySession(OracleConnection.PROXYTYPE_USER_NAME,props);
  System.out.println("String_Node_Str");
  mngr.rollback();
  mngr.begin();
  conn=jtaDs.getConnection();
  if (conn instanceof OracleConnection) {
    oracleConn=(OracleConnection)conn;
  }
 else {
    oracleConn=(OracleConnection)serverSession.getServerPlatform().unwrapConnection(conn);
  }
  try {
    if (oracleConn.isProxySession()) {
      oracleConn.close(OracleConnection.PROXY_SESSION);
      fail("String_Node_Str");
    }
    System.out.println("String_Node_Str");
  }
  finally {
    try {
      conn.close();
    }
 catch (    SQLException ex) {
    }
    mngr.rollback();
    System.out.println("String_Node_Str");
  }
}

Fixed version (ground truth):
public void testJtaDataSource() throws Exception {
  if (!shouldRunPureJdbcTests) {
    System.out.println("String_Node_Str");
    return;
  }
  if (!serverSession.getLogin().shouldUseExternalTransactionController()) {
    throw new RuntimeException("String_Node_Str");
  }
  System.out.println("String_Node_Str");
  TransactionManager mngr=((JTATransactionController)serverSession.getExternalTransactionController()).getTransactionManager();
  DataSource jtaDs=((JNDIConnector)serverSession.getLogin().getConnector()).getDataSource();
  Properties props=new Properties();
  props.setProperty(OracleConnection.PROXY_USER_NAME,System.getProperty("String_Node_Str"));
  mngr.begin();
  Connection conn=jtaDs.getConnection();
  OracleConnection oracleConn;
  if (conn instanceof OracleConnection) {
    oracleConn=(OracleConnection)conn;
  }
 else {
    oracleConn=(OracleConnection)serverSession.getServerPlatform().unwrapConnection(conn);
  }
  oracleConn.openProxySession(OracleConnection.PROXYTYPE_USER_NAME,props);
  oracleConn.setAutoCommit(false);
  System.out.println("String_Node_Str");
  mngr.rollback();
  mngr.begin();
  conn=jtaDs.getConnection();
  if (conn instanceof OracleConnection) {
    oracleConn=(OracleConnection)conn;
  }
 else {
    oracleConn=(OracleConnection)serverSession.getServerPlatform().unwrapConnection(conn);
  }
  try {
    if (oracleConn.isProxySession()) {
      oracleConn.close(OracleConnection.PROXY_SESSION);
      fail("String_Node_Str");
    }
    System.out.println("String_Node_Str");
  }
  finally {
    try {
      conn.close();
    }
 catch (    SQLException ex) {
    }
    mngr.rollback();
    System.out.println("String_Node_Str");
  }
}