code: public static Tree UCPtransform(Tree t) {
      if (t == null) {
        return null;
      }
      Tree firstChild = t.firstChild();
      if (firstChild != null) {
        List<Pair<TregexPattern,TsurgeonPattern>> ops = Generics.newArrayList();
  
        for (int i = 0; i < operations.length; i++) {
          for (TregexPattern pattern : matchPatterns[i]) {
            ops.add(Generics.newPair(pattern, operations[i]));
          }
        }
  
        return Tsurgeon.processPatternsOnTree(ops, t);
      } else {
        return t;
      }
    }
docs: Transforms t if it contains an UCP, it will change the UCP tag
  into the phrasal tag of the first word of the UCP
  (UCP (JJ electronic) (, ,) (NN computer) (CC and) (NN building))
  will become
  (ADJP (JJ electronic) (, ,) (NN computer) (CC and) (NN building))
  
  @param t a tree to be transformed
  @return t transformed