Program: 160539
Project: 160539
Buggy source:
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) private void processDownload(Long download) throws BimServerClientException, UserException, ServerException, PublicInterfaceNotFoundException {
  WaitingList<Long> waitingList=new WaitingList<Long>();
  try {
    InputStream downloadData=bimServerClient.getDownloadData(download,getIfcSerializerOid());
    boolean log=false;
    if (log) {
      ByteArrayOutputStream baos=new ByteArrayOutputStream();
      if (downloadData instanceof SerializerInputstream) {
        SerializerInputstream serializerInputStream=(SerializerInputstream)downloadData;
        serializerInputStream.getEmfSerializer().writeToOutputStream(baos);
      }
 else {
        IOUtils.copy((InputStream)downloadData,baos);
      }
      FileOutputStream fos=new FileOutputStream(new File(download + "String_Node_Str"));
      IOUtils.write(baos.toByteArray(),fos);
      fos.close();
      downloadData=new ByteArrayInputStream(baos.toByteArray());
    }
 else {
      ByteArrayOutputStream baos=new ByteArrayOutputStream();
      if (downloadData instanceof SerializerInputstream) {
        SerializerInputstream serializerInputStream=(SerializerInputstream)downloadData;
        serializerInputStream.getEmfSerializer().writeToOutputStream(baos);
      }
 else {
        IOUtils.copy((InputStream)downloadData,baos);
      }
      downloadData=new ByteArrayInputStream(baos.toByteArray());
    }
    JsonReader jsonReader=new JsonReader(new InputStreamReader(downloadData,Charsets.UTF_8));
    try {
      jsonReader.beginObject();
      if (jsonReader.nextName().equals("String_Node_Str")) {
        jsonReader.beginArray();
        while (jsonReader.hasNext()) {
          jsonReader.beginObject();
          if (jsonReader.nextName().equals("String_Node_Str")) {
            long oid=jsonReader.nextLong();
            if (jsonReader.nextName().equals("String_Node_Str")) {
              String type=jsonReader.nextString();
              EClass eClass=(EClass)Ifc2x3tc1Package.eINSTANCE.getEClassifier(type);
              if (eClass == null) {
                throw new BimServerClientException("String_Node_Str" + type);
              }
              if (jsonReader.nextName().equals("String_Node_Str")) {
                String state=jsonReader.nextString();
                IdEObject object=null;
                if (containsNoFetch(oid)) {
                  object=getNoFetch(oid);
                }
 else {
                  object=(IdEObject)Ifc2x3tc1Factory.eINSTANCE.create(eClass);
                  ((IdEObjectImpl)object).eSetStore(eStore);
                  ((IdEObjectImpl)object).setOid(oid);
                  add(oid,object);
                }
                if (state.equals("String_Node_Str")) {
                  ((IdEObjectImpl)object).setLoadingState(State.TO_BE_LOADED);
                }
 else {
                  while (jsonReader.hasNext()) {
                    String featureName=jsonReader.nextName();
                    boolean embedded=false;
                    if (featureName.startsWith("String_Node_Str")) {
                      featureName=featureName.substring(5);
                    }
 else                     if (featureName.startsWith("String_Node_Str")) {
                      embedded=true;
                      featureName=featureName.substring(5);
                    }
                    EStructuralFeature eStructuralFeature=eClass.getEStructuralFeature(featureName);
                    if (eStructuralFeature == null) {
                      throw new BimServerClientException("String_Node_Str" + featureName + "String_Node_Str"+ eClass.getName());
                    }
                    if (eStructuralFeature.isMany()) {
                      jsonReader.beginArray();
                      if (eStructuralFeature instanceof EAttribute) {
                        List list=(List)object.eGet(eStructuralFeature);
                        List<String> stringList=null;
                        if (eStructuralFeature.getEType() == EcorePackage.eINSTANCE.getEDoubleObject() || eStructuralFeature.getEType() == EcorePackage.eINSTANCE.getEDouble()) {
                          EStructuralFeature asStringFeature=eClass.getEStructuralFeature(eStructuralFeature.getName() + "String_Node_Str");
                          stringList=(List<String>)object.eGet(asStringFeature);
                        }
                        while (jsonReader.hasNext()) {
                          Object e=readPrimitive(jsonReader,eStructuralFeature);
                          list.add(e);
                          if (eStructuralFeature.getEType() == EcorePackage.eINSTANCE.getEDouble()) {
                            double val=(Double)e;
                            stringList.add("String_Node_Str" + val);
                          }
                        }
                      }
 else                       if (eStructuralFeature instanceof EReference) {
                        int index=0;
                        while (jsonReader.hasNext()) {
                          if (embedded) {
                            List list=(List)object.eGet(eStructuralFeature);
                            jsonReader.beginObject();
                            String n=jsonReader.nextName();
                            if (n.equals("String_Node_Str")) {
                              String t=jsonReader.nextString();
                              IdEObject wrappedObject=(IdEObject)Ifc2x3tc1Factory.eINSTANCE.create((EClass)Ifc2x3tc1Package.eINSTANCE.getEClassifier(t));
                              ((IdEObjectImpl)wrappedObject).setOid(object.getOid());
                              ((IdEObjectImpl)wrappedObject).eSetStore(eStore);
                              if (jsonReader.nextName().equals("String_Node_Str")) {
                                EStructuralFeature wv=wrappedObject.eClass().getEStructuralFeature("String_Node_Str");
                                wrappedObject.eSet(wv,readPrimitive(jsonReader,wv));
                                list.add(wrappedObject);
                              }
 else {
                              }
                            }
 else                             if (n.equals("String_Node_Str")) {
                              long refOid=jsonReader.nextLong();
                              if (containsNoFetch(refOid)) {
                                IdEObject refObj=getNoFetch(refOid);
                                AbstractEList l=(AbstractEList)object.eGet(eStructuralFeature);
                                while (l.size() <= index) {
                                  l.addUnique(refObj.eClass().getEPackage().getEFactoryInstance().create(refObj.eClass()));
                                }
                                l.setUnique(index,refObj);
                              }
 else {
                                waitingList.add(refOid,new ListWaitingObject(-1,object,eStructuralFeature,index));
                              }
                            }
                            jsonReader.endObject();
                          }
 else {
                            long refOid=jsonReader.nextLong();
                            if (containsNoFetch(refOid)) {
                              IdEObject refObj=getNoFetch(refOid);
                              AbstractEList l=(AbstractEList)object.eGet(eStructuralFeature);
                              while (l.size() <= index) {
                                l.addUnique(refObj.eClass().getEPackage().getEFactoryInstance().create(refObj.eClass()));
                              }
                              l.setUnique(index,refObj);
                            }
 else {
                              waitingList.add(refOid,new ListWaitingObject(-1,object,eStructuralFeature,index));
                            }
                            index++;
                          }
                        }
                      }
                      jsonReader.endArray();
                    }
 else {
                      if (eStructuralFeature instanceof EAttribute) {
                        Object x=readPrimitive(jsonReader,eStructuralFeature);
                        if (eStructuralFeature.getEType() == EcorePackage.eINSTANCE.getEDouble()) {
                          EStructuralFeature asStringFeature=object.eClass().getEStructuralFeature(eStructuralFeature.getName() + "String_Node_Str");
                          object.eSet(asStringFeature,"String_Node_Str" + x);
                        }
                        object.eSet(eStructuralFeature,x);
                      }
 else                       if (eStructuralFeature instanceof EReference) {
                        if (embedded) {
                          jsonReader.beginObject();
                          if (jsonReader.nextName().equals("String_Node_Str")) {
                            String t=jsonReader.nextString();
                            IdEObject wrappedObject=(IdEObject)Ifc2x3tc1Factory.eINSTANCE.create((EClass)Ifc2x3tc1Package.eINSTANCE.getEClassifier(t));
                            ((IdEObjectImpl)wrappedObject).eSetStore(eStore);
                            ((IdEObjectImpl)wrappedObject).setOid(object.getOid());
                            if (jsonReader.nextName().equals("String_Node_Str")) {
                              EStructuralFeature wv=wrappedObject.eClass().getEStructuralFeature("String_Node_Str");
                              wrappedObject.eSet(wv,readPrimitive(jsonReader,wv));
                              object.eSet(eStructuralFeature,wrappedObject);
                            }
 else {
                            }
                          }
                          jsonReader.endObject();
                        }
 else {
                          long refOid=jsonReader.nextLong();
                          if (containsNoFetch(refOid)) {
                            IdEObject refObj=getNoFetch(refOid);
                            object.eSet(eStructuralFeature,refObj);
                          }
 else {
                            waitingList.add(refOid,new SingleWaitingObject(-1,object,eStructuralFeature));
                          }
                        }
                      }
                    }
                  }
                }
                if (waitingList.containsKey(oid)) {
                  try {
                    waitingList.updateNode(oid,eClass,object);
                  }
 catch (                  DeserializeException e) {
                    LOGGER.error("String_Node_Str",e);
                  }
                }
              }
            }
          }
          jsonReader.endObject();
        }
        jsonReader.endArray();
      }
      jsonReader.endObject();
    }
 catch (    IfcModelInterfaceException e1) {
      LOGGER.error("String_Node_Str",e1);
    }
 finally {
      jsonReader.close();
    }
  }
 catch (  IOException e) {
    LOGGER.error("String_Node_Str",e);
  }
catch (  SerializerException e) {
    LOGGER.error("String_Node_Str",e);
  }
 finally {
    waitingList.dumpIfNotEmpty();
    bimServerClient.getServiceInterface().cleanupLongAction(download);
  }
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) private void processDownload(Long download) throws BimServerClientException, UserException, ServerException, PublicInterfaceNotFoundException, IfcModelInterfaceException, IOException {
  WaitingList<Long> waitingList=new WaitingList<Long>();
  try {
    InputStream downloadData=bimServerClient.getDownloadData(download,getIfcSerializerOid());
    boolean log=false;
    if (log) {
      ByteArrayOutputStream baos=new ByteArrayOutputStream();
      if (downloadData instanceof SerializerInputstream) {
        SerializerInputstream serializerInputStream=(SerializerInputstream)downloadData;
        serializerInputStream.getEmfSerializer().writeToOutputStream(baos);
      }
 else {
        IOUtils.copy((InputStream)downloadData,baos);
      }
      FileOutputStream fos=new FileOutputStream(new File(download + "String_Node_Str"));
      IOUtils.write(baos.toByteArray(),fos);
      fos.close();
      downloadData=new ByteArrayInputStream(baos.toByteArray());
    }
 else {
      ByteArrayOutputStream baos=new ByteArrayOutputStream();
      if (downloadData instanceof SerializerInputstream) {
        SerializerInputstream serializerInputStream=(SerializerInputstream)downloadData;
        serializerInputStream.getEmfSerializer().writeToOutputStream(baos);
      }
 else {
        IOUtils.copy((InputStream)downloadData,baos);
      }
      downloadData=new ByteArrayInputStream(baos.toByteArray());
    }
    JsonReader jsonReader=new JsonReader(new InputStreamReader(downloadData,Charsets.UTF_8));
    try {
      jsonReader.beginObject();
      if (jsonReader.nextName().equals("String_Node_Str")) {
        jsonReader.beginArray();
        while (jsonReader.hasNext()) {
          jsonReader.beginObject();
          if (jsonReader.nextName().equals("String_Node_Str")) {
            long oid=jsonReader.nextLong();
            if (jsonReader.nextName().equals("String_Node_Str")) {
              String type=jsonReader.nextString();
              EClass eClass=(EClass)Ifc2x3tc1Package.eINSTANCE.getEClassifier(type);
              if (eClass == null) {
                throw new BimServerClientException("String_Node_Str" + type);
              }
              if (jsonReader.nextName().equals("String_Node_Str")) {
                String state=jsonReader.nextString();
                IdEObject object=null;
                if (containsNoFetch(oid)) {
                  object=getNoFetch(oid);
                }
 else {
                  object=(IdEObject)Ifc2x3tc1Factory.eINSTANCE.create(eClass);
                  ((IdEObjectImpl)object).eSetStore(eStore);
                  ((IdEObjectImpl)object).setOid(oid);
                  add(oid,object);
                }
                if (state.equals("String_Node_Str")) {
                  ((IdEObjectImpl)object).setLoadingState(State.TO_BE_LOADED);
                }
 else {
                  while (jsonReader.hasNext()) {
                    String featureName=jsonReader.nextName();
                    boolean embedded=false;
                    if (featureName.startsWith("String_Node_Str")) {
                      featureName=featureName.substring(5);
                    }
 else                     if (featureName.startsWith("String_Node_Str")) {
                      embedded=true;
                      featureName=featureName.substring(5);
                    }
                    EStructuralFeature eStructuralFeature=eClass.getEStructuralFeature(featureName);
                    if (eStructuralFeature == null) {
                      throw new BimServerClientException("String_Node_Str" + featureName + "String_Node_Str"+ eClass.getName());
                    }
                    if (eStructuralFeature.isMany()) {
                      jsonReader.beginArray();
                      if (eStructuralFeature instanceof EAttribute) {
                        List list=(List)object.eGet(eStructuralFeature);
                        List<String> stringList=null;
                        if (eStructuralFeature.getEType() == EcorePackage.eINSTANCE.getEDoubleObject() || eStructuralFeature.getEType() == EcorePackage.eINSTANCE.getEDouble()) {
                          EStructuralFeature asStringFeature=eClass.getEStructuralFeature(eStructuralFeature.getName() + "String_Node_Str");
                          stringList=(List<String>)object.eGet(asStringFeature);
                        }
                        while (jsonReader.hasNext()) {
                          Object e=readPrimitive(jsonReader,eStructuralFeature);
                          list.add(e);
                          if (eStructuralFeature.getEType() == EcorePackage.eINSTANCE.getEDouble()) {
                            double val=(Double)e;
                            stringList.add("String_Node_Str" + val);
                          }
                        }
                      }
 else                       if (eStructuralFeature instanceof EReference) {
                        int index=0;
                        while (jsonReader.hasNext()) {
                          if (embedded) {
                            List list=(List)object.eGet(eStructuralFeature);
                            jsonReader.beginObject();
                            String n=jsonReader.nextName();
                            if (n.equals("String_Node_Str")) {
                              String t=jsonReader.nextString();
                              IdEObject wrappedObject=(IdEObject)Ifc2x3tc1Factory.eINSTANCE.create((EClass)Ifc2x3tc1Package.eINSTANCE.getEClassifier(t));
                              ((IdEObjectImpl)wrappedObject).setOid(object.getOid());
                              ((IdEObjectImpl)wrappedObject).eSetStore(eStore);
                              if (jsonReader.nextName().equals("String_Node_Str")) {
                                EStructuralFeature wv=wrappedObject.eClass().getEStructuralFeature("String_Node_Str");
                                wrappedObject.eSet(wv,readPrimitive(jsonReader,wv));
                                list.add(wrappedObject);
                              }
 else {
                              }
                            }
 else                             if (n.equals("String_Node_Str")) {
                              long refOid=jsonReader.nextLong();
                              if (containsNoFetch(refOid)) {
                                IdEObject refObj=getNoFetch(refOid);
                                AbstractEList l=(AbstractEList)object.eGet(eStructuralFeature);
                                while (l.size() <= index) {
                                  l.addUnique(refObj.eClass().getEPackage().getEFactoryInstance().create(refObj.eClass()));
                                }
                                l.setUnique(index,refObj);
                              }
 else {
                                waitingList.add(refOid,new ListWaitingObject(-1,object,eStructuralFeature,index));
                              }
                            }
                            jsonReader.endObject();
                          }
 else {
                            long refOid=jsonReader.nextLong();
                            if (containsNoFetch(refOid)) {
                              IdEObject refObj=getNoFetch(refOid);
                              AbstractEList l=(AbstractEList)object.eGet(eStructuralFeature);
                              while (l.size() <= index) {
                                l.addUnique(refObj.eClass().getEPackage().getEFactoryInstance().create(refObj.eClass()));
                              }
                              l.setUnique(index,refObj);
                            }
 else {
                              waitingList.add(refOid,new ListWaitingObject(-1,object,eStructuralFeature,index));
                            }
                            index++;
                          }
                        }
                      }
                      jsonReader.endArray();
                    }
 else {
                      if (eStructuralFeature instanceof EAttribute) {
                        Object x=readPrimitive(jsonReader,eStructuralFeature);
                        if (eStructuralFeature.getEType() == EcorePackage.eINSTANCE.getEDouble()) {
                          EStructuralFeature asStringFeature=object.eClass().getEStructuralFeature(eStructuralFeature.getName() + "String_Node_Str");
                          object.eSet(asStringFeature,"String_Node_Str" + x);
                        }
                        object.eSet(eStructuralFeature,x);
                      }
 else                       if (eStructuralFeature instanceof EReference) {
                        if (embedded) {
                          jsonReader.beginObject();
                          if (jsonReader.nextName().equals("String_Node_Str")) {
                            String t=jsonReader.nextString();
                            IdEObject wrappedObject=(IdEObject)Ifc2x3tc1Factory.eINSTANCE.create((EClass)Ifc2x3tc1Package.eINSTANCE.getEClassifier(t));
                            ((IdEObjectImpl)wrappedObject).eSetStore(eStore);
                            ((IdEObjectImpl)wrappedObject).setOid(object.getOid());
                            if (jsonReader.nextName().equals("String_Node_Str")) {
                              EStructuralFeature wv=wrappedObject.eClass().getEStructuralFeature("String_Node_Str");
                              wrappedObject.eSet(wv,readPrimitive(jsonReader,wv));
                              object.eSet(eStructuralFeature,wrappedObject);
                            }
 else {
                            }
                          }
                          jsonReader.endObject();
                        }
 else {
                          long refOid=jsonReader.nextLong();
                          if (containsNoFetch(refOid)) {
                            IdEObject refObj=getNoFetch(refOid);
                            object.eSet(eStructuralFeature,refObj);
                          }
 else {
                            waitingList.add(refOid,new SingleWaitingObject(-1,object,eStructuralFeature));
                          }
                        }
                      }
                    }
                  }
                }
                if (waitingList.containsKey(oid)) {
                  try {
                    waitingList.updateNode(oid,eClass,object);
                  }
 catch (                  DeserializeException e) {
                    LOGGER.error("String_Node_Str",e);
                  }
                }
              }
            }
          }
          jsonReader.endObject();
        }
        jsonReader.endArray();
      }
      jsonReader.endObject();
    }
  finally {
      jsonReader.close();
    }
    waitingList.dumpIfNotEmpty();
  }
 catch (  SerializerException e) {
    LOGGER.error("String_Node_Str",e);
  }
 finally {
    bimServerClient.getServiceInterface().cleanupLongAction(download);
  }
}