Program: 96365
Project: 96365
Buggy source:
/** 
 * @param trayType LINUX_GTK = 1; LINUX_APP_INDICATOR = 2; SWING_INDICATOR = 3;
 */
public static void determineIconSize(int trayType){
  int trayScale=0;
  int menuScale=0;
  if (SystemTray.AUTO_TRAY_SIZE) {
    if (OS.isWindows()) {
      trayScale=SystemTray.DEFAULT_WINDOWS_SIZE;
      menuScale=SystemTray.DEFAULT_MENU_SIZE;
    }
 else {
      if (trayType == SystemTray.TYPE_SWING || trayType == SystemTray.TYPE_GTK_STATUSICON) {
        trayScale=SystemTray.DEFAULT_LINUX_SIZE;
        menuScale=SystemTray.DEFAULT_MENU_SIZE;
      }
 else {
        int uiScalingFactor=0;
        try {
          ByteArrayOutputStream byteArrayOutputStream=new ByteArrayOutputStream(8196);
          PrintStream outputStream=new PrintStream(byteArrayOutputStream);
          final ShellProcessBuilder shellVersion=new ShellProcessBuilder(outputStream);
          shellVersion.setExecutable("String_Node_Str");
          shellVersion.addArgument("String_Node_Str");
          shellVersion.addArgument("String_Node_Str");
          shellVersion.addArgument("String_Node_Str");
          shellVersion.start();
          String output=ShellProcessBuilder.getOutput(byteArrayOutputStream);
          if (!output.isEmpty()) {
            if (SystemTray.DEBUG) {
              SystemTray.logger.debug("String_Node_Str",output);
            }
            if (output.contains("String_Node_Str")) {
              String value=output.substring(output.indexOf("String_Node_Str") + 7,output.length() - 1);
              uiScalingFactor=Integer.parseInt(value);
            }
          }
        }
 catch (        Throwable e) {
          if (SystemTray.DEBUG) {
            SystemTray.logger.error("String_Node_Str",e);
          }
        }
        if (uiScalingFactor > 1) {
          trayScale=SystemTray.DEFAULT_LINUX_SIZE * uiScalingFactor;
          menuScale=SystemTray.DEFAULT_MENU_SIZE * uiScalingFactor;
        }
 else {
          trayScale=SystemTray.DEFAULT_LINUX_SIZE;
          menuScale=SystemTray.DEFAULT_MENU_SIZE;
        }
        if (SystemTray.DEBUG) {
          SystemTray.logger.debug("String_Node_Str",uiScalingFactor,trayScale);
        }
      }
    }
  }
 else {
    if (OS.isWindows()) {
      trayScale=SystemTray.DEFAULT_WINDOWS_SIZE;
      menuScale=SystemTray.DEFAULT_MENU_SIZE;
    }
 else {
      trayScale=SystemTray.DEFAULT_LINUX_SIZE;
      menuScale=SystemTray.DEFAULT_MENU_SIZE;
    }
  }
  TRAY_SIZE=trayScale;
  ENTRY_SIZE=menuScale;
}

Fixed version (ground truth):
/** 
 * @param trayType LINUX_GTK = 1; LINUX_APP_INDICATOR = 2; SWING_INDICATOR = 3;
 */
public static void determineIconSize(int trayType){
  int trayScale;
  int menuScale;
  if (SystemTray.AUTO_TRAY_SIZE) {
    if (OS.isWindows()) {
      trayScale=SystemTray.DEFAULT_WINDOWS_SIZE;
      menuScale=SystemTray.DEFAULT_MENU_SIZE;
    }
 else {
      if (trayType == SystemTray.TYPE_SWING || trayType == SystemTray.TYPE_GTK_STATUSICON) {
        trayScale=SystemTray.DEFAULT_LINUX_SIZE;
        menuScale=SystemTray.DEFAULT_MENU_SIZE;
      }
 else {
        if (SystemTray.DEBUG) {
          SystemTray.logger.error("String_Node_Str");
        }
        int uiScalingFactor=0;
        try {
          ByteArrayOutputStream byteArrayOutputStream=new ByteArrayOutputStream(8196);
          PrintStream outputStream=new PrintStream(byteArrayOutputStream);
          final ShellProcessBuilder shellVersion=new ShellProcessBuilder(outputStream);
          shellVersion.setExecutable("String_Node_Str");
          shellVersion.addArgument("String_Node_Str");
          shellVersion.addArgument("String_Node_Str");
          shellVersion.addArgument("String_Node_Str");
          shellVersion.start();
          String output=ShellProcessBuilder.getOutput(byteArrayOutputStream);
          if (!output.isEmpty()) {
            if (SystemTray.DEBUG) {
              SystemTray.logger.debug("String_Node_Str",output);
            }
            if (output.contains("String_Node_Str")) {
              String value=output.substring(output.indexOf("String_Node_Str") + 7,output.length() - 1);
              uiScalingFactor=Integer.parseInt(value);
            }
          }
        }
 catch (        Throwable e) {
          if (SystemTray.DEBUG) {
            SystemTray.logger.error("String_Node_Str",e);
          }
        }
        if (uiScalingFactor > 1) {
          trayScale=SystemTray.DEFAULT_LINUX_SIZE * uiScalingFactor;
          menuScale=SystemTray.DEFAULT_MENU_SIZE * uiScalingFactor;
        }
 else {
          trayScale=SystemTray.DEFAULT_LINUX_SIZE;
          menuScale=SystemTray.DEFAULT_MENU_SIZE;
        }
        if (SystemTray.DEBUG) {
          SystemTray.logger.debug("String_Node_Str",uiScalingFactor,trayScale);
        }
      }
    }
  }
 else {
    if (OS.isWindows()) {
      trayScale=SystemTray.DEFAULT_WINDOWS_SIZE;
      menuScale=SystemTray.DEFAULT_MENU_SIZE;
    }
 else {
      trayScale=SystemTray.DEFAULT_LINUX_SIZE;
      menuScale=SystemTray.DEFAULT_MENU_SIZE;
    }
  }
  TRAY_SIZE=trayScale;
  ENTRY_SIZE=menuScale;
}