Here you can find the source of truncatePunctuation(String authority)
private static String truncatePunctuation(String authority)
//package com.java2s; public class Main { private static String truncatePunctuation(String authority) { while (authority.startsWith("(")) // starting parenthesis of basionym authority authority = authority.substring("(".length()).trim(); while (authority.endsWith("(")) // end of '<name> (<year>)' authority after cropping year authority = authority.substring(0, (authority.length() - "(".length())).trim(); while (authority.endsWith(",")) // end of '<name>, <year>' authority after cropping year authority = authority.substring(0, (authority.length() - ",".length())).trim(); while (authority.endsWith(")")) // end of '<name> (<year>)' authority or basionym authority authority = authority.substring(0, (authority.length() - ")".length())).trim(); return authority; }//from w w w .j a va 2 s.com }