Program: 115238
Project: 115238
Buggy source:
/** 
 * Import Data, the logic which imports the data for our data service. Note that we will return three strings string 0: status, either 'success', 'fail', or 'warn'. string 1: the message string which will be returned in our soap response string 2: the audit message, currently not used but will be saved in the event of a success.
 * @author thickerson
 * @param dataSource
 * @param resources
 * @param studyBean
 * @param userBean
 * @param xml
 * @return
 * @throws Exception
 */
public ArrayList<String> importData(DataSource dataSource,CoreResources resources,StudyBean studyBean,UserAccountBean userBean,String xml) throws Exception {
  locale=new Locale("String_Node_Str");
  ResourceBundleProvider.updateLocale(locale);
  respage=ResourceBundleProvider.getPageMessagesBundle();
  StringBuffer msg=new StringBuffer();
  StringBuffer auditMsg=new StringBuffer();
  Mapping myMap=new Mapping();
  InputStream xsdFile=resources.getInputStream("String_Node_Str");
  InputStream xsdFile2=resources.getInputStream("String_Node_Str");
  InputStream mapInputStream=resources.getInputStream("String_Node_Str");
  myMap.loadMapping(new InputSource(mapInputStream));
  Unmarshaller um1=new Unmarshaller(myMap);
  ODMContainer odmContainer=new ODMContainer();
  if (xml != null) {
    msg.append("String_Node_Str");
  }
 else {
    msg.append("String_Node_Str" + respage.getString("String_Node_Str") + "String_Node_Str");
  }
  try {
    System.out.println(xml);
    odmContainer=(ODMContainer)um1.unmarshal(new StringReader(xml));
    System.out.println("String_Node_Str" + odmContainer.getCrfDataPostImportContainer().getStudyOID());
    System.out.println("String_Node_Str" + odmContainer.getCrfDataPostImportContainer().getSubjectData().size());
  }
 catch (  Exception me1) {
    me1.printStackTrace();
    System.out.println("String_Node_Str" + me1.getMessage());
    try {
      odmContainer=(ODMContainer)um1.unmarshal(new StringReader(xml));
    }
 catch (    Exception me2) {
      me2.printStackTrace();
      MessageFormat mf=new MessageFormat("String_Node_Str");
      mf.applyPattern(respage.getString("String_Node_Str"));
      Object[] arguments={me1.getMessage()};
      msg.append(mf.format(arguments) + "String_Node_Str");
      auditMsg.append(mf.format(arguments) + "String_Node_Str");
      System.out.println("String_Node_Str" + msg.toString());
      return getFailReturnList(msg.toString(),auditMsg.toString());
    }
  }
  return importProcessedData(dataSource,resources,studyBean,userBean,odmContainer,msg,auditMsg,true);
}

Fixed version (ground truth):
/** 
 * Import Data, the logic which imports the data for our data service. Note that we will return three strings string 0: status, either 'success', 'fail', or 'warn'. string 1: the message string which will be returned in our soap response string 2: the audit message, currently not used but will be saved in the event of a success.
 * @author thickerson
 * @param dataSource
 * @param resources
 * @param studyBean
 * @param userBean
 * @param xml
 * @return
 * @throws Exception
 */
public ArrayList<String> importData(DataSource dataSource,CoreResources resources,StudyBean studyBean,UserAccountBean userBean,String xml) throws Exception {
  locale=new Locale("String_Node_Str");
  ResourceBundleProvider.updateLocale(locale);
  respage=ResourceBundleProvider.getPageMessagesBundle();
  StringBuffer msg=new StringBuffer();
  StringBuffer auditMsg=new StringBuffer();
  Mapping myMap=new Mapping();
  InputStream xsdFile=resources.getInputStream("String_Node_Str");
  InputStream xsdFile2=resources.getInputStream("String_Node_Str");
  InputStream mapInputStream=resources.getInputStream("String_Node_Str");
  myMap.loadMapping(new InputSource(mapInputStream));
  Unmarshaller um1=new Unmarshaller(myMap);
  ODMContainer odmContainer=new ODMContainer();
  if (xml != null) {
    msg.append("String_Node_Str");
  }
 else {
    msg.append("String_Node_Str" + respage.getString("String_Node_Str") + "String_Node_Str");
  }
  try {
    System.out.println(xml);
    odmContainer=(ODMContainer)um1.unmarshal(new StringReader(xml));
    System.out.println("String_Node_Str" + odmContainer.getCrfDataPostImportContainer().getStudyOID());
    System.out.println("String_Node_Str" + odmContainer.getCrfDataPostImportContainer().getSubjectData().size());
  }
 catch (  Exception me1) {
    me1.printStackTrace();
    System.out.println("String_Node_Str" + me1.getMessage());
    try {
      odmContainer=(ODMContainer)um1.unmarshal(new StringReader(xml));
    }
 catch (    Exception me2) {
      me2.printStackTrace();
      MessageFormat mf=new MessageFormat("String_Node_Str");
      mf.applyPattern(respage.getString("String_Node_Str"));
      Object[] arguments={me1.getMessage()};
      msg.append(mf.format(arguments) + "String_Node_Str");
      auditMsg.append(mf.format(arguments) + "String_Node_Str");
      System.out.println("String_Node_Str" + msg.toString());
      return getFailReturnList(msg.toString(),auditMsg.toString());
    }
  }
  return importProcessedData(dataSource,resources,studyBean,userBean,odmContainer,msg,auditMsg,true,null);
}