Gets the low water mark of a source.

@param source - the source
492960
public long getLWMScn(String source) {
        WaterMarkEntry e = sourceWaterMarkMap.get(source);
        return (e == null) ? 0 : e.getLWMScn();
    }
892948
private void setSource(String source) {
        requireArgument(source != null && !source.trim().isEmpty(), "Source cannot be null or empty.");
        _source = source;
    }
657845
private void provideSystemIdIfRequired(Source source) {
        if (source!=null && (source.getSystemId() == null
                             || source.getSystemId().length() == 0)) {
            source.setSystemId(getDefaultSystemId());
        }
    }
712947
static Properties loadClose(final InputStream in, final Object source) {
        final Properties props = new Properties();
        if (null != in) {
            try {
                props.load(in);
            } catch (final IOException e) {
                LowLevelLogUtil.logException("Unable to read " + source, e);
            } finally {
                try {
                    in.close();
                } catch (final IOException e) {
                    LowLevelLogUtil.logException("Unable to close " + source, e);
                }
            }
        }
        return props;
    }
624752
@Override
    public synchronized Clock updateHWMark(String source, long hwm) {
        _sourceWaterMarks.saveHWMark(source, hwm);
        return current();
    }
1088499
public String getSourceLine(File file, int line, String sep)
	{
		SourceFile source = sourceFiles.get(file);

		if (source == null)
		{
			try
			{
				source = new SourceFile(file);
				sourceFiles.put(file, source);
			} catch (IOException e)
			{
				return "Cannot open source file: " + file;
			}
		}

		return line + sep + source.getLine(line);
	}
1236047
public List<String> keywords(final String source) {
    Map<String, Long> wordCounts = splitChars(source, DEFAULT_THRESHOLD).stream().collect(Collectors.groupingBy(x -> x, Collectors.counting()));
    wordCounts = aggregateKeywords(wordCounts);
    return wordCounts.entrySet().stream().filter(x -> x.getValue() > 1)
      .sorted(Comparator.comparing(x -> -entropy(x.getKey()) * Math.pow(x.getValue(), 0.3)))
      .map(e -> {
        if (isVerbose()) {
          verbose.println(String.format("KEYWORD: \"%s\" - %s * %.3f / %s", e.getKey(), e.getValue(), entropy(e.getKey()), e.getKey().length()));
        }
        return e.getKey();
      }).collect(Collectors.toList());
  }
140778
public OMVRBTreeEntry<K, V> getLowerEntry(final K key) {
    final OMVRBTreeEntry<K, V> p = getEntry(key, true, PartialSearchMode.LOWEST_BOUNDARY);

    if (p == null)
      return null;

    return previous(p);
  }
1165565
protected String sourceLineTrimmed(ASTNode node) {
        return sourceCode.line(AstUtil.findFirstNonAnnotationLine(node, sourceCode) - 1);
    }
1205982
public T get(Object source) {
		try {
			if (!method.isAccessible()) {
				method.setAccessible(true);
			}
			@SuppressWarnings("unchecked")
			T value=(T) method.invoke(source);
			return value;
		} catch (IllegalAccessException illegalAccessException) {
			return null;
		} catch (IllegalArgumentException illegalArgumentException) {
			return null;
		} catch (InvocationTargetException invocationTargetException) {
			return null;
		}
	}
1137691
public static InputSource sourceToInputSource(Source source) {

        if (source instanceof SAXSource) {
            return ((SAXSource) source).getInputSource();
        } else if (source instanceof StreamSource) {
            StreamSource ss      = (StreamSource) source;
            InputSource  isource = new InputSource(ss.getSystemId());

            isource.setByteStream(ss.getInputStream());
            isource.setCharacterStream(ss.getReader());
            isource.setPublicId(ss.getPublicId());

            return isource;
        } else {
            return null;
        }
    }
824713
private long getAppendHighWatermark(ExtractType extractType) {
    LOG.debug("Getting append high water mark");
    if (this.isFullDump()) {
      LOG.info("Overriding high water mark with end value:" + ConfigurationKeys.SOURCE_QUERYBASED_END_VALUE);
      long highWatermark = this.state.getPropAsLong(ConfigurationKeys.SOURCE_QUERYBASED_END_VALUE, 0);
      if (highWatermark != 0) {
        // User specifies SOURCE_QUERYBASED_END_VALUE
        hasUserSpecifiedHighWatermark = true;
      }
      return highWatermark;
    }
    return this.getAppendWatermarkCutoff(extractType);
  }
89117
@Override
  public int available() throws IOException
  {
    if (_readOffset < _readLength) {
      return _readLength - _readOffset;
    }

    StreamImpl source = _source;

    if (source != null) {
      return source.getAvailable();
    }
    else {
      return -1;
    }
  }
765102
public static boolean containsWhitespace(final String source) {

    int strLen = source.length();
    for (int i = 0; i < strLen; i++) {
      if (Character.isWhitespace(source.charAt(i))) {
        return true;
      }
    }
    return false;
  }
1072472
public static String getFileExtension(String fileName) {
        int lastDot = fileName.lastIndexOf('.');
        return (lastDot >= 0) ? fileName.substring(lastDot) : null;
    }
1121784
public static DataSource getDataSource(String source) {
		DataSource ds = dataSources.get(source);
		if (ds == null){
			synchronized (dataSourcesStructureLock){
				ds = dataSources.get(source);
				if (ds == null){
					ds = createDataSource(source);
					if (ds != null){
						dataSources.put(source, ds);
					}
				}
			}
		}
		return ds;
	}
428809
private long getLowWaterMark(Iterable<WorkUnitState> previousStates, String lowWaterMark) {

    long lowWaterMarkValue = retriever.getWatermarkFromString(lowWaterMark);

    // Find the max HWM from the previous states, this is the new current LWM
    for (WorkUnitState previousState : previousStates) {
      if (previousState.getWorkingState().equals(WorkUnitState.WorkingState.COMMITTED)) {
        long previousHighWaterMark = previousState.getWorkunit().getHighWaterMark();
        if (previousHighWaterMark > lowWaterMarkValue) {
          lowWaterMarkValue = previousHighWaterMark;
        }
      }
    }

    return lowWaterMarkValue + getRetriever().getWatermarkIncrementMs();
  }