Remove repeated code logic
Remove repeated code logic

Bug https://bugzilla.gnome.org/show_bug.cgi?id=740176

thisMagpie/java-atk-wrapper,GNOME/java-atk-wrapper,GNOME/java-atk-wrapper,thisMagpie/java-atk-wrapper,GNOME/java-atk-wrapper,thisMagpie/java-atk-wrapper