System.out.println("Solving ambiguities under " + areaTree.getNode().toString() + " pos " + startPos + "-" + stopPos );
  private void resolveAmbiguitiesCommonRoot( AreaNode areaTree, ONode baseDoc, ONode destDoc,    int startPos, int stopPos ) {    System.out.println("Solving ambiguities under " + areaTree.getNode().toString() +    " pos " + startPos + "-" + stopPos );    // Scan for runs of ambigious children, having at least one candidate with    // areaTree.getNode() as root    ONode srcParent =  getFirstMapping(null, areaTree.getChild(startPos).getNode().parent );    int runStart = startPos, runStop = stopPos;    while( runStart <= stopPos ) {      // Scan for block start      if( areaTree.getChild(runStart).getCandidateCount() <= 1 ) {        runStart++;        continue;      }      // Possible start, does it have a suitable candidate      boolean rightParent = false;      for( int i = 0; !rightParent && i < areaTree.getChild(runStart).getCandidateCount(); i ++ ) {        //System.out.println("parent = "+  areaTree.getChild(runStart).getCandidate(i).parent+", atmatch=" +srcParent);       rightParent = areaTree.getChild(runStart).getCandidate(i).parent == srcParent;      }      if( !rightParent ) {        runStart++;        continue;      }      // We have a start! -- now scan for end      runStop = runStart;      while( rightParent && (runStop+1) <= stopPos ) {        if( areaTree.getChild(runStop+1).getCandidateCount() <= 1 )          break; // end of ambigous run...        rightParent = false;        for( int i = 0; !rightParent && i < areaTree.getChild(runStop+1).getCandidateCount(); i ++ )          rightParent = areaTree.getChild(runStop+1).getCandidate(i).parent == srcParent;        if( rightParent)          runStop ++;      }      // Run is from runStart to runStop (both inclusive)      solveAmbiguity( areaTree, runStart, runStop, startPos, stopPos, (ElementNode) srcParent );      runStart = runStop + 2; // +2 because there must a a marker/dont_care/END symbol to the right of                              // runStop    }  }