Program: 126852
Project: 126852
Buggy source:
public static String getContextTrueValue(DatabaseConnection conn,String paramValue){
  String trueSchemaName=null;
  String tempVlaue=paramValue;
  if (conn.isContextMode()) {
    if (conn.getContextId() != null && !"String_Node_Str".equals(conn.getContextId())) {
      String contextID=conn.getContextId();
      paramValue=ContextParameterUtils.getVariableFromCode(paramValue);
      IRepositoryViewObject repObj;
      try {
        repObj=ProxyRepositoryFactory.getInstance().getLastVersion(contextID);
        if (repObj != null && repObj.getProperty() != null && repObj.getProperty().getItem() instanceof ContextItem) {
          ContextItem contextItem=(ContextItem)repObj.getProperty().getItem();
          List list=contextItem.getContext();
          Iterator it=list.iterator();
          while (it.hasNext()) {
            Object o=it.next();
            if (o instanceof ContextType) {
              ContextType contextType=(ContextType)o;
              List contextList=contextType.getContextParameter();
              for (int i=0; i < contextList.size(); i++) {
                Object obj=contextList.get(i);
                if (obj instanceof ContextParameterType) {
                  ContextParameterType type=(ContextParameterType)obj;
                  if (type.getName().equals(paramValue)) {
                    if (type.getValue() == null) {
                      paramValue="String_Node_Str";
                    }
 else {
                      paramValue=type.getValue();
                    }
                    break;
                  }
                }
              }
            }
          }
        }
      }
 catch (      PersistenceException e1) {
        ExceptionHandler.process(e1);
      }
    }
  }
  trueSchemaName=paramValue;
  return trueSchemaName;
}

Fixed version (ground truth):
public static String getContextTrueValue(DatabaseConnection conn,String paramValue){
  if (conn.isContextMode()) {
    if (conn.getContextId() != null && !"String_Node_Str".equals(conn.getContextId())) {
      String contextID=conn.getContextId();
      String tempVlaue=ContextParameterUtils.getVariableFromCode(paramValue);
      if (tempVlaue == null) {
        return "String_Node_Str";
      }
      IRepositoryViewObject repObj;
      try {
        repObj=ProxyRepositoryFactory.getInstance().getLastVersion(contextID);
        if (repObj != null && repObj.getProperty() != null && repObj.getProperty().getItem() instanceof ContextItem) {
          ContextItem contextItem=(ContextItem)repObj.getProperty().getItem();
          List list=contextItem.getContext();
          Iterator it=list.iterator();
          while (it.hasNext()) {
            Object o=it.next();
            if (o instanceof ContextType) {
              ContextType contextType=(ContextType)o;
              List contextList=contextType.getContextParameter();
              for (int i=0; i < contextList.size(); i++) {
                Object obj=contextList.get(i);
                if (obj instanceof ContextParameterType) {
                  ContextParameterType type=(ContextParameterType)obj;
                  if (type.getName().equals(tempVlaue)) {
                    if (type.getValue() == null) {
                      paramValue="String_Node_Str";
                    }
 else {
                      paramValue=type.getValue();
                    }
                    break;
                  }
                }
              }
            }
          }
        }
      }
 catch (      PersistenceException e1) {
        ExceptionHandler.process(e1);
      }
    }
  }
  return paramValue;
}