text: public static boolean hasExactSharedBorder(CellRangeAddress crA, CellRangeAddress crB) {int oFirstRow = crB.getFirstRow();int oLastRow  = crB.getLastRow();int oFirstCol = crB.getFirstColumn();int oLastCol  = crB.getLastColumn();if (crA.getFirstRow() > 0 && crA.getFirstRow()-1 == oLastRow ||oFirstRow > 0 && oFirstRow-1 == crA.getLastRow()) {return crA.getFirstColumn() == oFirstCol && crA.getLastColumn() == oLastCol;}if (crA.getFirstColumn()>0 && crA.getFirstColumn() - 1 == oLastCol ||oFirstCol>0 && crA.getLastColumn() == oFirstCol -1) {return crA.getFirstRow() == oFirstRow && crA.getLastRow() == oLastRow;}return false;}