Program: 70707
Project: 70707
Buggy source:
public void applyOrientation(Control control,boolean mirrored){
  if (control == null)   return;
  if (!isInitialized)   init();
  if (osWinClass == null)   return;
  int swtStyle=control.getStyle() & ~(SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT | SWT.MIRRORED);
  try {
    int osStyle=((Integer)GET_WINDOW_LONG.invoke(null,new Object[]{Integer.valueOf(control.handle),Integer.valueOf(OS_STYLE_INDEX)})).intValue();
    if (mirrored) {
      SET_WINDOW_LONG.invoke(null,new Object[]{Integer.valueOf(control.handle),Integer.valueOf(OS_STYLE_INDEX),Integer.valueOf(osStyle | WS_EX_LAYOUTRTL | WS_EX_NOINHERITLAYOUT)});
      swtStyle|=SWT.RIGHT_TO_LEFT | SWT.MIRRORED;
      STYLE_FIELD.setInt(control,swtStyle);
    }
 else {
      SET_WINDOW_LONG.invoke(null,new Object[]{Integer.valueOf(control.handle),Integer.valueOf(OS_STYLE_INDEX),Integer.valueOf(osStyle & ~WS_EX_LAYOUTRTL)});
      swtStyle|=SWT.LEFT_TO_RIGHT;
      STYLE_FIELD.setInt(control,swtStyle);
    }
    INVALIDATE_RECT.invoke(null,new Object[]{Integer.valueOf(control.handle),null,Boolean.TRUE});
  }
 catch (  SecurityException e) {
    ExceptionHandler.handle(e,true);
  }
catch (  IllegalArgumentException e) {
    ExceptionHandler.handle(e,true);
  }
catch (  IllegalAccessException e) {
    ExceptionHandler.handle(e,true);
  }
catch (  InvocationTargetException e) {
    ExceptionHandler.handle(e,true);
  }
  if (control instanceof Composite) {
    Control[] children=((Composite)control).getChildren();
    if (children != null) {
      for (int i=children.length; i-- > 0; ) {
        applyOrientation(children[i],mirrored);
      }
    }
  }
}

Fixed version (ground truth):
public void applyOrientation(Control control,boolean mirrored){
  if (control == null)   return;
  if (!isInitialized)   init();
  if (osWinClass == null)   return;
  int swtStyle=control.getStyle() & ~(SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT | SWT.MIRRORED);
  try {
    int osStyle=((Integer)GET_WINDOW_LONG.invoke(null,new Object[]{Integer.valueOf(getControHandle(control)),Integer.valueOf(OS_STYLE_INDEX)})).intValue();
    if (mirrored) {
      SET_WINDOW_LONG.invoke(null,new Object[]{Integer.valueOf(getControHandle(control)),Integer.valueOf(OS_STYLE_INDEX),Integer.valueOf(osStyle | WS_EX_LAYOUTRTL | WS_EX_NOINHERITLAYOUT)});
      swtStyle|=SWT.RIGHT_TO_LEFT | SWT.MIRRORED;
      STYLE_FIELD.setInt(control,swtStyle);
    }
 else {
      SET_WINDOW_LONG.invoke(null,new Object[]{Integer.valueOf(getControHandle(control)),Integer.valueOf(OS_STYLE_INDEX),Integer.valueOf(osStyle & ~WS_EX_LAYOUTRTL)});
      swtStyle|=SWT.LEFT_TO_RIGHT;
      STYLE_FIELD.setInt(control,swtStyle);
    }
    INVALIDATE_RECT.invoke(null,new Object[]{Integer.valueOf(getControHandle(control)),null,Boolean.TRUE});
  }
 catch (  SecurityException e) {
    ExceptionHandler.handle(e,true);
  }
catch (  IllegalArgumentException e) {
    ExceptionHandler.handle(e,true);
  }
catch (  IllegalAccessException e) {
    ExceptionHandler.handle(e,true);
  }
catch (  InvocationTargetException e) {
    ExceptionHandler.handle(e,true);
  }
  if (control instanceof Composite) {
    Control[] children=((Composite)control).getChildren();
    if (children != null) {
      for (int i=children.length; i-- > 0; ) {
        applyOrientation(children[i],mirrored);
      }
    }
  }
}