code: @Override
  	public AFPChain align(Atom[] ca1, Atom[] ca2, Object param) throws StructureException{
  		if ( ! (param instanceof CECPParameters))
  			throw new IllegalArgumentException("CE algorithm needs an object of call CeParameters as argument.");
  
  		CECPParameters cpparams = (CECPParameters) param;
  		this.params = cpparams;
  
  		boolean duplicateRight;
  
  		switch( cpparams.getDuplicationHint() ) {
  		case LEFT:
  			duplicateRight = false;
  			break;
  		case RIGHT:
  			duplicateRight = true;
  			break;
  		case SHORTER:
  			duplicateRight = ca1.length >= ca2.length;
  			break;
  		default:
  			duplicateRight = true;
  		}
  
  
  		if( duplicateRight ) {
  			return alignRight(ca1, ca2, cpparams);
  		} else {
  			if(debug) {
  				System.out.println("Swapping alignment order.");
  			}
  			AFPChain afpChain = this.alignRight(ca2, ca1, cpparams);
  			return invertAlignment(afpChain);
  		}
  	}
docs: Aligns ca1 and ca2 using a heuristic to check for CPs.
  <p>
  Aligns ca1 against a doubled ca2, then cleans up the alignment.
  @param ca1
  @param ca2
  @param param
  @return the alignment, possibly containing a CP.
  @throws StructureException