Program: 155349
Project: 155349
Buggy source:
public static void putVariable(String name,EveObject eo){
  name=scopeOperatorAnalysis(name);
  String[] split=name.split("String_Node_Str");
  EveObject obj=getCurrentScope();
  if (split.length > 1) {
    String resolvedObj=split[0];
    obj=obj.getField(split[0]);
    if (obj == null) {
      throw new EveError(resolvedObj + "String_Node_Str");
    }
    Integer index=null;
    for (int c=1; c < split.length; c++) {
      name=split[c];
      index=null;
      if (c == split.length - 1) {
        List<Integer> indices=indexOperatorAnalysis(name);
        if (indices != null) {
          obj=obj.getField(stripIndices(name));
          obj=getParentByIndex(obj,indices);
          index=indices.get(indices.size() - 1);
        }
        break;
      }
      List<Integer> indices=indexOperatorAnalysis(name);
      if (indices != null) {
        obj=obj.getField(stripIndices(name));
        obj=getByIndex(obj,indices);
        index=indices.get(indices.size() - 1);
      }
 else {
        obj=obj.getField(name);
      }
      if (obj == null && c != split.length - 1) {
        throw new EveError("String_Node_Str" + name + "String_Node_Str"+ resolvedObj+ "String_Node_Str");
      }
      resolvedObj+="String_Node_Str" + name;
    }
    if (obj == null) {
      throw new EveError(resolvedObj + "String_Node_Str");
    }
    if (index != null) {
      obj.setIndexedProperty(index,eo);
    }
 else {
      obj.putField(name,eo);
    }
  }
 else {
    List<Integer> indices=indexOperatorAnalysis(name);
    if (indices != null) {
      obj=obj.getField(stripIndices(name));
      if (indices.size() > 1) {
        obj=getParentByIndex(obj,indices);
      }
      obj.setIndexedProperty(indices.get(indices.size() - 1),eo);
    }
    obj.putField(name,eo);
  }
  scopeOperatorEnsure();
}

Fixed version (ground truth):
public static void putVariable(String name,EveObject eo){
  String fullName=name;
  name=scopeOperatorAnalysis(name);
  String[] split=name.split("String_Node_Str");
  EveObject obj=getCurrentScope();
  if (split.length > 1) {
    String resolvedObj=split[0];
    obj=obj.getField(split[0]);
    if (obj == null) {
      throw new EveError(resolvedObj + "String_Node_Str");
    }
    Integer index=null;
    for (int c=1; c < split.length; c++) {
      name=split[c];
      index=null;
      if (c == split.length - 1) {
        List<Integer> indices=indexOperatorAnalysis(name);
        if (indices != null) {
          obj=obj.getField(stripIndices(name));
          obj=getParentByIndex(obj,indices);
          index=indices.get(indices.size() - 1);
        }
        break;
      }
      List<Integer> indices=indexOperatorAnalysis(name);
      if (indices != null) {
        obj=obj.getField(stripIndices(name));
        obj=getByIndex(obj,indices);
        index=indices.get(indices.size() - 1);
      }
 else {
        obj=obj.getField(name);
      }
      if (obj == null && c != split.length - 1) {
        throw new EveError("String_Node_Str" + name + "String_Node_Str"+ resolvedObj+ "String_Node_Str");
      }
      resolvedObj+="String_Node_Str" + name;
    }
    if (obj == null) {
      throw new EveError(resolvedObj + "String_Node_Str");
    }
    if (obj.isMarkedForClone()) {
      EveObject parent=null;
      if (resolvedObj.contains("String_Node_Str")) {
        parent=getParentVariable(resolvedObj);
      }
 else {
        parent=getVariable(resolvedObj);
      }
      String[] propSplit=resolvedObj.split("String_Node_Str");
      String prop="String_Node_Str";
      if (propSplit.length > 1) {
        prop=stripIndices(propSplit[propSplit.length - 1]);
      }
 else {
        prop=stripIndices(name);
      }
      obj=obj.eveClone();
      parent.putField(prop,obj);
    }
    if (index != null) {
      obj.setIndexedProperty(index,eo);
    }
 else {
      obj.putField(name,eo);
    }
  }
 else {
    List<Integer> indices=indexOperatorAnalysis(name);
    if (indices != null) {
      obj=obj.getField(stripIndices(name));
      if (indices.size() > 1) {
        obj=getParentByIndex(obj,indices);
      }
      obj.setIndexedProperty(indices.get(indices.size() - 1),eo);
    }
    obj.putField(name,eo);
  }
  scopeOperatorEnsure();
}