core/src/main/java/com/orientechnologies/orient/core/sql/parser/OStatementCache.java
public OStatement get(String statement) {
    OStatement result;
    synchronized (map) {
      //LRU
      result = map.remove(statement);
      if (result != null) {
        map.put(statement, result);
      }
    }
    if (result == null) {
      result = parse(statement);
      synchronized (map) {
        map.put(statement, result);
      }
    }
    return result;
  }
public OStatement get(String statement) {
    OStatement result;
    synchronized (map) {
      //LRU
      result = map.remove(statement);
      if (result != null) {
        map.put(statement, result);
      }
    }
    if (result == null) {
      result = parse(statement);
      synchronized (map) {
        map.put(statement, result);
      }
    }
    return result;
  }
public OStatement get ( String statement ) { OStatement result ; synchronized ( map ) { //LRU result = map . remove ( statement ) ; if ( result != null ) { map . put ( statement , result ) ; } } if ( result == null ) { result = parse ( statement ) ; synchronized ( map ) { map . put ( statement , result ) ; } } return result ; }
@param statement an SQL statement

@return the corresponding executor, taking it from the internal cache, if it exists
@param statement an SQL statement