@Nullable
  private static LocalAttachInfo getAttachInfo(@Nullable Project project,
                                               int pid,
                                               String commandLine,
                                               @Nullable Map<String, LocalAttachInfo> addressMap) {
    LocalAttachInfo res;
    String pidString = String.valueOf(pid);
    if (addressMap != null) {
      res = addressMap.get(pidString);
      if (res != null) {
        return res;
      }
    }

    res = getProcessAttachInfo(ParametersListUtil.parse(commandLine), pidString);
    if (res == null && addressMap == null) {
      res =
        getProcessAttachInfo(pidString, project != null ? JavaDebuggerAttachUtil.getAttachedPids(project) : Collections.emptySet(), true);
    }
    return res;
  }
@Nullable
  private static LocalAttachInfo getAttachInfo(@Nullable Project project,
                                               int pid,
                                               String commandLine,
                                               @Nullable Map<String, LocalAttachInfo> addressMap)