Program: 96585
Project: 96585
Buggy source:
public Variable getVariable(String name){
  OID oid;
  OctetString context=null;
  int pos=name.indexOf(':');
  if (pos >= 0) {
    context=new OctetString(name.substring(0,pos));
    oid=new OID(name.substring(pos + 1,name.length()));
  }
 else {
    oid=new OID(name);
  }
  final DefaultMOContextScope scope=new DefaultMOContextScope(context,oid,true,oid,true);
  MOQuery query=new DefaultMOQuery(scope,false,this);
  ManagedObject mo=server.lookup(query);
  if (mo != null) {
    final VariableBinding vb=new VariableBinding(oid);
    final RequestStatus status=new RequestStatus();
    SubRequest req=new SubRequest(){
      private boolean completed;
      private MOQuery query;
      public boolean hasError(){
        return false;
      }
      public void setErrorStatus(      int errorStatus){
        status.setErrorStatus(errorStatus);
      }
      public int getErrorStatus(){
        return status.getErrorStatus();
      }
      public RequestStatus getStatus(){
        return status;
      }
      public MOScope getScope(){
        return scope;
      }
      public VariableBinding getVariableBinding(){
        return vb;
      }
      public Request getRequest(){
        return null;
      }
      public Object getUndoValue(){
        return null;
      }
      public void setUndoValue(      Object undoInformation){
      }
      public void completed(){
        completed=true;
      }
      public boolean isComplete(){
        return completed;
      }
      public void setTargetMO(      ManagedObject managedObject){
      }
      public ManagedObject getTargetMO(){
        return null;
      }
      public int getIndex(){
        return 0;
      }
      public void setQuery(      MOQuery query){
        this.query=query;
      }
      public MOQuery getQuery(){
        return query;
      }
      public SubRequestIterator repetitions(){
        return null;
      }
      public void updateNextRepetition(){
      }
      public Object getUserObject(){
        return null;
      }
      public void setUserObject(      Object userObject){
      }
    }
;
    mo.get(req);
    return vb.getVariable();
  }
  return null;
}

Fixed version (ground truth):
@Override public Variable getVariable(String name){
  OID oid;
  OctetString context=null;
  int pos=name.indexOf(':');
  if (pos >= 0) {
    context=new OctetString(name.substring(0,pos));
    oid=new OID(name.substring(pos + 1,name.length()));
  }
 else {
    oid=new OID(name);
  }
  final DefaultMOContextScope scope=new DefaultMOContextScope(context,oid,true,oid,true);
  MOQuery query=new DefaultMOQuery(scope,false,this);
  ManagedObject mo=server.lookup(query);
  if (mo != null) {
    final VariableBinding vb=new VariableBinding(oid);
    final RequestStatus status=new RequestStatus();
    SubRequest req=new SubRequest(){
      private boolean completed;
      private MOQuery query;
      @Override public boolean hasError(){
        return false;
      }
      @Override public void setErrorStatus(      int errorStatus){
        status.setErrorStatus(errorStatus);
      }
      @Override public int getErrorStatus(){
        return status.getErrorStatus();
      }
      @Override public RequestStatus getStatus(){
        return status;
      }
      @Override public MOScope getScope(){
        return scope;
      }
      @Override public VariableBinding getVariableBinding(){
        return vb;
      }
      @Override public Request getRequest(){
        return null;
      }
      @Override public Object getUndoValue(){
        return null;
      }
      @Override public void setUndoValue(      Object undoInformation){
      }
      @Override public void completed(){
        completed=true;
      }
      @Override public boolean isComplete(){
        return completed;
      }
      @Override public void setTargetMO(      ManagedObject managedObject){
      }
      @Override public ManagedObject getTargetMO(){
        return null;
      }
      @Override public int getIndex(){
        return 0;
      }
      @Override public void setQuery(      MOQuery query){
        this.query=query;
      }
      @Override public MOQuery getQuery(){
        return query;
      }
      @Override public SubRequestIterator repetitions(){
        return null;
      }
      @Override public void updateNextRepetition(){
      }
      @Override public Object getUserObject(){
        return null;
      }
      @Override public void setUserObject(      Object userObject){
      }
    }
;
    mo.get(req);
    return vb.getVariable();
  }
  return null;
}