Program: 160510
Project: 160510
Buggy source:
private void writeList(EObject object,EStructuralFeature feature) throws SerializerException, IOException {
  List<?> list=(List<?>)object.eGet(feature);
  List<?> doubleStingList=null;
  if (feature.getEType() == EcorePackage.eINSTANCE.getEDouble() && model.isUseDoubleStrings()) {
    EStructuralFeature doubleStringFeature=feature.getEContainingClass().getEStructuralFeature(feature.getName() + "String_Node_Str");
    if (doubleStringFeature == null) {
      throw new SerializerException("String_Node_Str" + feature.getName() + "String_Node_Str"+ "String_Node_Str");
    }
    doubleStingList=(List<?>)object.eGet(doubleStringFeature);
  }
  if (list.isEmpty()) {
    if (!feature.isUnsettable()) {
      print(OPEN_CLOSE_PAREN);
    }
 else {
      print("String_Node_Str");
    }
  }
 else {
    print(OPEN_PAREN);
    boolean first=true;
    int index=0;
    for (    Object listObject : list) {
      if (!first) {
        print(COMMA);
      }
      if ((listObject instanceof IdEObject) && model.contains((IdEObject)listObject)) {
        IdEObject eObject=(IdEObject)listObject;
        print(DASH);
        print(String.valueOf(getExpressId(eObject)));
      }
 else {
        if (listObject == null) {
          print(DOLLAR);
        }
 else {
          if (listObject instanceof IdEObject && feature.getEType().getEAnnotation("String_Node_Str") != null) {
            IdEObject eObject=(IdEObject)listObject;
            Object realVal=eObject.eGet(eObject.eClass().getEStructuralFeature("String_Node_Str"));
            if (realVal instanceof Double) {
              Object stringVal=eObject.eGet(eObject.eClass().getEStructuralFeature("String_Node_Str"));
              if (stringVal != null && model.isUseDoubleStrings()) {
                print((String)stringVal);
              }
 else {
                print((String)realVal);
              }
            }
 else {
              writePrimitive(realVal);
            }
          }
 else           if (listObject instanceof EObject) {
            IdEObject eObject=(IdEObject)listObject;
            EClass class1=eObject.eClass();
            EStructuralFeature structuralFeature=class1.getEStructuralFeature(WRAPPED_VALUE);
            if (structuralFeature != null) {
              Object realVal=eObject.eGet(structuralFeature);
              print(upperCases.get(class1));
              print(OPEN_PAREN);
              if (realVal instanceof Double) {
                Object stringVal=eObject.eGet(class1.getEStructuralFeature(structuralFeature.getName() + "String_Node_Str"));
                if (stringVal != null && model.isUseDoubleStrings()) {
                  print((String)stringVal);
                }
 else {
                  print((String)realVal);
                }
              }
 else {
                writePrimitive(realVal);
              }
              print(CLOSE_PAREN);
            }
 else {
              LOGGER.info("String_Node_Str" + object + "String_Node_Str"+ feature.getName()+ "String_Node_Str"+ eObject);
            }
          }
 else {
            if (doubleStingList != null) {
              if (index < doubleStingList.size()) {
                String val=(String)doubleStingList.get(index);
                if (val == null) {
                  writePrimitive(listObject);
                }
 else {
                  print((String)val);
                }
              }
 else {
                writePrimitive(listObject);
              }
            }
 else {
              writePrimitive(listObject);
            }
          }
        }
      }
      first=false;
      index++;
    }
    print(CLOSE_PAREN);
  }
}

Fixed version (ground truth):
private void writeList(EObject object,EStructuralFeature feature) throws SerializerException, IOException {
  List<?> list=(List<?>)object.eGet(feature);
  List<?> doubleStingList=null;
  if (feature.getEType() == EcorePackage.eINSTANCE.getEDouble() && model.isUseDoubleStrings()) {
    EStructuralFeature doubleStringFeature=feature.getEContainingClass().getEStructuralFeature(feature.getName() + "String_Node_Str");
    if (doubleStringFeature == null) {
      throw new SerializerException("String_Node_Str" + feature.getName() + "String_Node_Str"+ "String_Node_Str");
    }
    doubleStingList=(List<?>)object.eGet(doubleStringFeature);
  }
  if (list.isEmpty()) {
    if (!feature.isUnsettable()) {
      print(OPEN_CLOSE_PAREN);
    }
 else {
      print("String_Node_Str");
    }
  }
 else {
    print(OPEN_PAREN);
    boolean first=true;
    int index=0;
    for (    Object listObject : list) {
      if (!first) {
        print(COMMA);
      }
      if ((listObject instanceof IdEObject) && model.contains((IdEObject)listObject)) {
        IdEObject eObject=(IdEObject)listObject;
        print(DASH);
        print(String.valueOf(getExpressId(eObject)));
      }
 else {
        if (listObject == null) {
          print(DOLLAR);
        }
 else {
          if (listObject instanceof IdEObject && feature.getEType().getEAnnotation("String_Node_Str") != null) {
            IdEObject eObject=(IdEObject)listObject;
            Object realVal=eObject.eGet(eObject.eClass().getEStructuralFeature("String_Node_Str"));
            if (realVal instanceof Double) {
              Object stringVal=eObject.eGet(eObject.eClass().getEStructuralFeature("String_Node_Str"));
              if (stringVal != null && model.isUseDoubleStrings()) {
                print((String)stringVal);
              }
 else {
                print((String)realVal);
              }
            }
 else {
              writePrimitive(realVal);
            }
          }
 else           if (listObject instanceof EObject) {
            IdEObject eObject=(IdEObject)listObject;
            EClass class1=eObject.eClass();
            EStructuralFeature structuralFeature=class1.getEStructuralFeature(WRAPPED_VALUE);
            if (structuralFeature != null) {
              Object realVal=eObject.eGet(structuralFeature);
              print(upperCases.get(class1));
              print(OPEN_PAREN);
              if (realVal instanceof Double) {
                if (model.isUseDoubleStrings()) {
                  Object stringVal=eObject.eGet(class1.getEStructuralFeature(structuralFeature.getName() + "String_Node_Str"));
                  if (stringVal != null) {
                    print((String)stringVal);
                  }
 else {
                    writePrimitive(realVal);
                  }
                }
              }
 else {
                writePrimitive(realVal);
              }
              print(CLOSE_PAREN);
            }
 else {
              LOGGER.info("String_Node_Str" + object + "String_Node_Str"+ feature.getName()+ "String_Node_Str"+ eObject);
            }
          }
 else {
            if (doubleStingList != null) {
              if (index < doubleStingList.size()) {
                String val=(String)doubleStingList.get(index);
                if (val == null) {
                  writePrimitive(listObject);
                }
 else {
                  print((String)val);
                }
              }
 else {
                writePrimitive(listObject);
              }
            }
 else {
              writePrimitive(listObject);
            }
          }
        }
      }
      first=false;
      index++;
    }
    print(CLOSE_PAREN);
  }
}