Program: 49404
Project: 49404
Buggy source:
/** 
 * Executes the multi-org upgrade task.
 * @throws DatabaseException if an error occurs while performing a database operation.
 */
public void execute() throws DatabaseException, SQLException {
  boolean autocommit=this.connection.getAutoCommit();
  this.connection.setAutoCommit(true);
  Map<String,String> orgContent=new HashMap<String,String>();
  ResultSet orgids=this.getOrgIDs();
  while (orgids.next()) {
    String orgid=orgids.getString(1);
    orgContent.clear();
    ResultSet productids=this.getProductIDs(orgid);
    while (productids.next()) {
      String productid=productids.getString(1);
      this.connection.setAutoCommit(false);
      String productuuid=this.generateUUID();
      this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str",productuuid,productid);
      this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str",this.generateUUID(),productuuid,productid);
      this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str",productuuid,productid);
      this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str",productuuid,productid);
      this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str",productuuid,productid);
      this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str",this.generateUUID(),productuuid,productid);
      this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str",this.generateUUID(),productuuid,productid);
      this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str",productuuid,productid);
      this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str",productuuid,productid,orgid);
      this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str",productuuid,productid,orgid);
      this.connection.commit();
      this.connection.setAutoCommit(true);
      ResultSet contentids=this.getContentIDs(productid);
      while (contentids.next()) {
        String contentid=contentids.getString(1);
        String contentuuid=orgContent.get(contentid);
        this.connection.setAutoCommit(false);
        if (contentuuid == null) {
          contentuuid=this.generateUUID();
          orgContent.put(contentid,contentuuid);
          this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",contentuuid,orgid,contentid);
          this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str",contentuuid,contentid);
          this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str",this.generateUUID(),contentuuid,contentid);
        }
        this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str",productuuid,contentuuid,productid,contentid);
        this.connection.commit();
        this.connection.setAutoCommit(true);
      }
      contentids.close();
    }
    productids.close();
    ResultSet subscriptionids=this.getProductIDs(orgid);
    while (subscriptionids.next()) {
      String subid=subscriptionids.getString(1);
      String subuuid=this.generateUUID();
      this.connection.setAutoCommit(false);
      this.executeUpdate("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",subuuid,orgid,orgid,orgid,subid);
      this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str",this.generateUUID(),subuuid,subid);
      this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str",subuuid,subid);
      this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str",subuuid,orgid,subid);
      this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str",subuuid,orgid,subid);
      this.connection.commit();
      this.connection.setAutoCommit(true);
    }
    subscriptionids.close();
  }
  orgids.close();
  this.connection.setAutoCommit(autocommit);
}

Fixed version (ground truth):
/** 
 * Executes the multi-org upgrade task.
 * @throws DatabaseException if an error occurs while performing a database operation
 * @throws SQLException if an error occurs while executing an SQL statement
 */
@SuppressWarnings("String_Node_Str") public void execute() throws DatabaseException, SQLException {
  boolean autocommit=this.connection.getAutoCommit();
  this.connection.setAutoCommit(true);
  Map<String,String> orgContent=new HashMap<String,String>();
  ResultSet orgids=this.getOrgIDs();
  while (orgids.next()) {
    String orgid=orgids.getString(1);
    orgContent.clear();
    ResultSet productids=this.getProductIDs(orgid);
    while (productids.next()) {
      String productid=productids.getString(1);
      this.connection.setAutoCommit(false);
      String productuuid=this.generateUUID();
      this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str",productuuid,productid);
      this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str",this.generateUUID(),productuuid,productid);
      this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str",productuuid,productid);
      this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str",productuuid,productid);
      this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str",productuuid,productid);
      this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str",this.generateUUID(),productuuid,productid);
      this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str",this.generateUUID(),productuuid,productid);
      this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str",productuuid,productid);
      this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str",productuuid,productid,orgid);
      this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str",productuuid,productid,orgid);
      this.connection.commit();
      this.connection.setAutoCommit(true);
      ResultSet contentids=this.getContentIDs(productid);
      while (contentids.next()) {
        String contentid=contentids.getString(1);
        String contentuuid=orgContent.get(contentid);
        this.connection.setAutoCommit(false);
        if (contentuuid == null) {
          contentuuid=this.generateUUID();
          orgContent.put(contentid,contentuuid);
          this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",contentuuid,orgid,contentid);
          this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str",contentuuid,contentid);
          this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str",this.generateUUID(),contentuuid,contentid);
        }
        this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str",productuuid,contentuuid,productid,contentid);
        this.connection.commit();
        this.connection.setAutoCommit(true);
      }
      contentids.close();
    }
    productids.close();
    ResultSet subscriptionids=this.getProductIDs(orgid);
    while (subscriptionids.next()) {
      String subid=subscriptionids.getString(1);
      String subuuid=this.generateUUID();
      this.connection.setAutoCommit(false);
      this.executeUpdate("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",subuuid,orgid,orgid,orgid,subid);
      this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str",this.generateUUID(),subuuid,subid);
      this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str",subuuid,subid);
      this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str",subuuid,orgid,subid);
      this.executeUpdate("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str",subuuid,orgid,subid);
      this.connection.commit();
      this.connection.setAutoCommit(true);
    }
    subscriptionids.close();
  }
  orgids.close();
  this.connection.setAutoCommit(autocommit);
}