Program: 73871
Project: 73871
Buggy source:
String printCubeAlongDimension(CubeCursor dataCursor,DimensionCursor countryCursor,DimensionCursor cityCursor,DimensionCursor streetCursor,DimensionCursor timeCursor,DimensionCursor productCursor1,DimensionCursor productCursor2) throws OLAPException {
  String[] lines=new String[4];
  for (int i=0; i < lines.length; i++) {
    lines[i]="String_Node_Str";
  }
  if (countryCursor != null && cityCursor != null && timeCursor != null) {
    countryCursor.beforeFirst();
    while (countryCursor.next()) {
      cityCursor.beforeFirst();
      while (cityCursor.next()) {
        streetCursor.beforeFirst();
        while (streetCursor.next()) {
          timeCursor.beforeFirst();
          while (timeCursor.next()) {
            lines[0]+=countryCursor.getObject("String_Node_Str") + "String_Node_Str";
            lines[1]+=cityCursor.getObject("String_Node_Str") + "String_Node_Str";
            lines[2]+=streetCursor.getObject("String_Node_Str") + "String_Node_Str";
            lines[3]+=timeCursor.getObject("String_Node_Str") + "String_Node_Str";
          }
        }
      }
    }
  }
  String output="String_Node_Str";
  for (int i=0; i < lines.length; i++) {
    output+="String_Node_Str" + lines[i];
  }
  lines=new String[1];
  lines[0]="String_Node_Str";
  if (productCursor1 != null && productCursor2 != null && countryCursor != null && cityCursor != null && timeCursor != null) {
    productCursor1.beforeFirst();
    while (productCursor1.next()) {
      productCursor2.beforeFirst();
      while (productCursor2.next()) {
        lines[0]+=productCursor1.getObject("String_Node_Str") + "String_Node_Str";
        lines[0]+=productCursor2.getObject("String_Node_Str") + "String_Node_Str";
        countryCursor.beforeFirst();
        while (countryCursor.next()) {
          cityCursor.beforeFirst();
          while (cityCursor.next()) {
            timeCursor.beforeFirst();
            while (timeCursor.next()) {
              lines[0]+=dataCursor.getObject("String_Node_Str") + "String_Node_Str";
            }
          }
        }
        lines[0]+="String_Node_Str";
      }
      lines[0]+="String_Node_Str";
    }
    productCursor1.close();
    productCursor2.close();
    countryCursor.close();
    cityCursor.close();
    timeCursor.close();
    dataCursor.close();
  }
 else   if (countryCursor != null && cityCursor != null && timeCursor != null) {
    countryCursor.beforeFirst();
    lines[0]+="String_Node_Str";
    while (countryCursor.next()) {
      cityCursor.beforeFirst();
      while (cityCursor.next()) {
        timeCursor.beforeFirst();
        while (timeCursor.next()) {
          lines[0]+=dataCursor.getObject("String_Node_Str") + "String_Node_Str";
        }
      }
    }
    countryCursor.close();
    cityCursor.close();
    timeCursor.close();
    dataCursor.close();
    lines[0]+="String_Node_Str";
  }
 else   if (productCursor1 != null && productCursor2 != null) {
    productCursor1.beforeFirst();
    while (productCursor1.next()) {
      productCursor2.beforeFirst();
      while (productCursor2.next()) {
        lines[0]+=productCursor1.getObject("String_Node_Str") + "String_Node_Str";
        lines[0]+=productCursor2.getObject("String_Node_Str") + "String_Node_Str";
        lines[0]+=dataCursor.getObject("String_Node_Str") + "String_Node_Str";
        lines[0]+="String_Node_Str";
      }
    }
    productCursor1.close();
    productCursor2.close();
    dataCursor.close();
    lines[0]+="String_Node_Str";
  }
  output+="String_Node_Str" + lines[0];
  System.out.print(output);
  return output;
}

Fixed version (ground truth):
String printCubeAlongDimension(CubeCursor dataCursor,DimensionCursor countryCursor,DimensionCursor cityCursor,DimensionCursor streetCursor,DimensionCursor timeCursor,DimensionCursor productCursor1,DimensionCursor productCursor2) throws OLAPException {
  String[] lines=new String[4];
  for (int i=0; i < lines.length; i++) {
    lines[i]="String_Node_Str";
  }
  if (countryCursor != null && cityCursor != null && timeCursor != null) {
    countryCursor.beforeFirst();
    while (countryCursor.next()) {
      cityCursor.beforeFirst();
      while (cityCursor.next()) {
        streetCursor.beforeFirst();
        while (streetCursor.next()) {
          timeCursor.beforeFirst();
          while (timeCursor.next()) {
            lines[0]+=countryCursor.getObject("String_Node_Str") + "String_Node_Str";
            lines[1]+=cityCursor.getObject("String_Node_Str") + "String_Node_Str";
            lines[2]+=streetCursor.getObject("String_Node_Str") + "String_Node_Str";
            lines[3]+=timeCursor.getObject("String_Node_Str") + "String_Node_Str";
          }
        }
      }
    }
  }
  String output="String_Node_Str";
  for (int i=0; i < lines.length; i++) {
    output+="String_Node_Str" + lines[i];
  }
  lines=new String[1];
  lines[0]="String_Node_Str";
  if (productCursor1 != null && productCursor2 != null && countryCursor != null && cityCursor != null && timeCursor != null) {
    productCursor1.beforeFirst();
    while (productCursor1.next()) {
      productCursor2.beforeFirst();
      while (productCursor2.next()) {
        lines[0]+=productCursor1.getObject("String_Node_Str") + "String_Node_Str";
        lines[0]+=productCursor2.getObject("String_Node_Str") + "String_Node_Str";
        countryCursor.beforeFirst();
        while (countryCursor.next()) {
          cityCursor.beforeFirst();
          while (cityCursor.next()) {
            timeCursor.beforeFirst();
            while (timeCursor.next()) {
              lines[0]+=dataCursor.getObject(OlapExpressionUtil.createMeasureCalculateMemeberName("String_Node_Str")) + "String_Node_Str";
            }
          }
        }
        lines[0]+="String_Node_Str";
      }
      lines[0]+="String_Node_Str";
    }
    productCursor1.close();
    productCursor2.close();
    countryCursor.close();
    cityCursor.close();
    timeCursor.close();
    dataCursor.close();
  }
 else   if (countryCursor != null && cityCursor != null && timeCursor != null) {
    countryCursor.beforeFirst();
    lines[0]+="String_Node_Str";
    while (countryCursor.next()) {
      cityCursor.beforeFirst();
      while (cityCursor.next()) {
        timeCursor.beforeFirst();
        while (timeCursor.next()) {
          lines[0]+=dataCursor.getObject(OlapExpressionUtil.createMeasureCalculateMemeberName("String_Node_Str")) + "String_Node_Str";
        }
      }
    }
    countryCursor.close();
    cityCursor.close();
    timeCursor.close();
    dataCursor.close();
    lines[0]+="String_Node_Str";
  }
 else   if (productCursor1 != null && productCursor2 != null) {
    productCursor1.beforeFirst();
    while (productCursor1.next()) {
      productCursor2.beforeFirst();
      while (productCursor2.next()) {
        lines[0]+=productCursor1.getObject("String_Node_Str") + "String_Node_Str";
        lines[0]+=productCursor2.getObject("String_Node_Str") + "String_Node_Str";
        lines[0]+=dataCursor.getObject(OlapExpressionUtil.createMeasureCalculateMemeberName("String_Node_Str")) + "String_Node_Str";
        lines[0]+="String_Node_Str";
      }
    }
    productCursor1.close();
    productCursor2.close();
    dataCursor.close();
    lines[0]+="String_Node_Str";
  }
  output+="String_Node_Str" + lines[0];
  System.out.print(output);
  return output;
}