Program: 73779
Project: 73779
Buggy source:
/** 
 * Execute the necessary commands to create a new model in the database according to the model specification given in the task parameter.
 * @param task The task to be completed. In this case, CreateModelTask. Thiswill tell the DB layer to create a new model in the database.
 * @exception DBExecutionException Thrown if there is a problem executingthe task.
 * @exception ModelAlreadyExistException Thrown if the model being createdalready exists.
 */
public void executeCreateModelTask(CreateModelTask task) throws DBExecutionException, ModelAlreadyExistException {
  try {
    if (_xmlContainer == null) {
      throw new DBExecutionException("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
    }
    if (_xmlTransaction == null) {
      throw new DBExecutionException("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
    }
    if (task == null) {
      throw new DBExecutionException("String_Node_Str" + "String_Node_Str");
    }
    XMLDBModel model=task.getXMLDBModel();
    if (model == null) {
      throw new DBExecutionException("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
    }
    XmlDocument doc=null;
    try {
      doc=_xmlContainer.getDocument(model.getModelName());
    }
 catch (    XmlException e) {
    }
    if (doc != null) {
      throw new ModelAlreadyExistException("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str");
    }
 else {
      String modelBody=model.getModel();
      modelBody=modelBody.substring(modelBody.indexOf("String_Node_Str"));
      _xmlContainer.putDocument(_xmlTransaction,model.getModelName(),modelBody);
    }
  }
 catch (  XmlException e) {
    throw new DBExecutionException("String_Node_Str" + e.getMessage(),e);
  }
}

Fixed version (ground truth):
/** 
 * Execute the necessary commands to create a new model in the database according to the model specification given in the task parameter.
 * @param task The task to be completed. In this case, CreateModelTask. Thiswill tell the DB layer to create a new model in the database.
 * @exception DBExecutionException Thrown if there is a problem executingthe task.
 * @exception ModelAlreadyExistException Thrown if the model being createdalready exists.
 */
public void executeCreateModelTask(CreateModelTask task) throws DBExecutionException, ModelAlreadyExistException {
  try {
    if (_xmlContainer == null) {
      throw new DBExecutionException("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
    }
    if (_xmlTransaction == null) {
      throw new DBExecutionException("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
    }
    if (task == null) {
      throw new DBExecutionException("String_Node_Str" + "String_Node_Str");
    }
    XMLDBModel model=task.getXMLDBModel();
    if (model == null) {
      throw new DBExecutionException("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
    }
    XmlDocument doc=null;
    try {
      doc=_xmlContainer.getDocument(model.getModelName());
    }
 catch (    XmlException e) {
    }
    if (doc != null) {
      throw new ModelAlreadyExistException("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str");
    }
 else {
      String modelBody=model.getModel();
      if (modelBody.indexOf("String_Node_Str") >= 0) {
        modelBody=modelBody.substring(modelBody.indexOf("String_Node_Str"));
        modelBody=modelBody.substring(modelBody.indexOf("String_Node_Str") + 1);
      }
      _xmlContainer.putDocument(_xmlTransaction,model.getModelName(),modelBody);
    }
  }
 catch (  XmlException e) {
    throw new DBExecutionException("String_Node_Str" + e.getMessage(),e);
  }
}