public static PlagiarismDetector getInstance(String name, String args) {
		if (PlagiarismDetector.nameToClassMap.containsKey(name)) {
			try {
				return (PlagiarismDetector) PlagiarismDetector.nameToClassMap.get(name).getConstructor(String.class)
						.newInstance(args);
			} catch (InstantiationException e) {
				// wont be thrown
				e.printStackTrace();
			} catch (IllegalAccessException e) {
				// wont be thrown
				e.printStackTrace();
			} catch (IllegalArgumentException e) {
				// wont be thrown
				e.printStackTrace();
			} catch (SecurityException e) {
				// wont be thrown
				e.printStackTrace();
			} catch (InvocationTargetException e) {
				// wont be thrown
				e.printStackTrace();
			} catch (NoSuchMethodException e) {
				// wont be thrown
				e.printStackTrace();
			}
			return null;
		} else {
			throw new IllegalArgumentException("Could not find PlagiarismDetector class with name " + name);
		}
	}