Program: 71635
Project: 71635
Buggy source:
protected void checkVersion(DataInputStream di) throws IOException {
  String tag=IOUtil.readString(di);
  String docVersion=IOUtil.readString(di);
  if (CORE_VERSION_0.equals(docVersion)) {
    coreVersion=0;
    docVersion=IOUtil.readString(di);
  }
 else   if (CORE_VERSION_1.equals(docVersion)) {
    coreVersion=0;
    docVersion=IOUtil.readString(di);
    properties=IOUtil.readMap(di);
  }
  String[] supportedVersions=new String[]{REPORT_DOCUMENT_VERSION_1_2_1,REPORT_DOCUMENT_VERSION_2_1_0,REPORT_DOCUMENT_VERSION_2_1_3};
  boolean supportedVersion=false;
  if (REPORT_DOCUMENT_TAG.equals(tag)) {
    for (int i=0; i < supportedVersions.length; i++) {
      if (supportedVersions[i].equals(docVersion)) {
        supportedVersion=true;
        break;
      }
    }
  }
  if (supportedVersion == false) {
    throw new IOException("String_Node_Str" + tag + "String_Node_Str"+ docVersion);
  }
  String extensions=(String)properties.get(BIRT_ENGINE_EXTENSIONS);
  if (extensions != null) {
    String[] extIds=extensions.split("String_Node_Str");
    for (    String extId : extIds) {
      IReportEngineExtension ext=engine.getEngineExtension(extId);
      if (ext == null) {
        throw new IOException("String_Node_Str" + extId);
      }
    }
  }
  if (properties.get(BIRT_ENGINE_VERSION_KEY) == null) {
    if (REPORT_DOCUMENT_VERSION_1_2_1.equals(docVersion)) {
      properties.put(BIRT_ENGINE_VERSION_KEY,BIRT_ENGINE_VERSION_2_1);
    }
 else     if (REPORT_DOCUMENT_VERSION_2_1_0.equals(docVersion)) {
      properties.put(BIRT_ENGINE_VERSION_KEY,BIRT_ENGINE_VERSION_2_1_RC5);
    }
 else     if (REPORT_DOCUMENT_VERSION_2_1_3.equals(docVersion)) {
      properties.put(BIRT_ENGINE_VERSION_KEY,BIRT_ENGINE_VERSION_2_1_3);
    }
  }
  String version=getVersion();
  if (properties.get(DATA_EXTRACTION_TASK_VERSION_KEY) == null) {
    if (BIRT_ENGINE_VERSION_2_1.equals(docVersion) || BIRT_ENGINE_VERSION_2_1_RC5.equals(version)) {
      properties.put(DATA_EXTRACTION_TASK_VERSION_KEY,DATA_EXTRACTION_TASK_VERSION_0);
    }
 else {
      properties.put(DATA_EXTRACTION_TASK_VERSION_KEY,DATA_EXTRACTION_TASK_VERSION_1);
    }
  }
  if (properties.get(PAGE_HINT_VERSION_KEY) == null) {
    properties.put(PAGE_HINT_VERSION_KEY,PAGE_HINT_VERSION_2);
  }
}

Fixed version (ground truth):
protected void checkVersion(DataInputStream di) throws IOException {
  String tag=IOUtil.readString(di);
  String docVersion=IOUtil.readString(di);
  if (CORE_VERSION_0.equals(docVersion)) {
    coreVersion=0;
    docVersion=IOUtil.readString(di);
  }
 else   if (CORE_VERSION_1.equals(docVersion)) {
    coreVersion=0;
    docVersion=IOUtil.readString(di);
    properties=IOUtil.readMap(di);
  }
  String[] supportedVersions=new String[]{REPORT_DOCUMENT_VERSION_1_2_1,REPORT_DOCUMENT_VERSION_2_1_0,REPORT_DOCUMENT_VERSION_2_1_3};
  boolean supportedVersion=false;
  if (REPORT_DOCUMENT_TAG.equals(tag)) {
    for (int i=0; i < supportedVersions.length; i++) {
      if (supportedVersions[i].equals(docVersion)) {
        supportedVersion=true;
        break;
      }
    }
  }
  if (supportedVersion == false) {
    throw new IOException("String_Node_Str" + tag + "String_Node_Str"+ docVersion);
  }
  String extensions=(String)properties.get(BIRT_ENGINE_EXTENSIONS);
  if (extensions != null && extensions.length() > 0) {
    String[] extIds=extensions.split("String_Node_Str");
    for (    String extId : extIds) {
      IReportEngineExtension ext=engine.getEngineExtension(extId);
      if (ext == null) {
        throw new IOException("String_Node_Str" + extId);
      }
    }
  }
  if (properties.get(BIRT_ENGINE_VERSION_KEY) == null) {
    if (REPORT_DOCUMENT_VERSION_1_2_1.equals(docVersion)) {
      properties.put(BIRT_ENGINE_VERSION_KEY,BIRT_ENGINE_VERSION_2_1);
    }
 else     if (REPORT_DOCUMENT_VERSION_2_1_0.equals(docVersion)) {
      properties.put(BIRT_ENGINE_VERSION_KEY,BIRT_ENGINE_VERSION_2_1_RC5);
    }
 else     if (REPORT_DOCUMENT_VERSION_2_1_3.equals(docVersion)) {
      properties.put(BIRT_ENGINE_VERSION_KEY,BIRT_ENGINE_VERSION_2_1_3);
    }
  }
  String version=getVersion();
  if (properties.get(DATA_EXTRACTION_TASK_VERSION_KEY) == null) {
    if (BIRT_ENGINE_VERSION_2_1.equals(docVersion) || BIRT_ENGINE_VERSION_2_1_RC5.equals(version)) {
      properties.put(DATA_EXTRACTION_TASK_VERSION_KEY,DATA_EXTRACTION_TASK_VERSION_0);
    }
 else {
      properties.put(DATA_EXTRACTION_TASK_VERSION_KEY,DATA_EXTRACTION_TASK_VERSION_1);
    }
  }
  if (properties.get(PAGE_HINT_VERSION_KEY) == null) {
    properties.put(PAGE_HINT_VERSION_KEY,PAGE_HINT_VERSION_2);
  }
}