IDEA-96131 Java: Braces placements don't work as expected for `Next Line`  [CR-IC-3694]
(cherry picked from commit 975cfe8)
IDEA-118613: catch all possible exceptions, that may be caused by corrupted storages
IDEA-102942  Wrap always   Chained methods calls  over-format simple operations
(cherry picked from commit 835ed38)
[log] IDEA-117816 small optimization in graph cell drawing

Make image width equal not to hardcoded 1000px, but to the size
which graph + references will actually occupy.

(cherry picked from commit 4c947abad4aced769c6513368679f0b4622cb7f4)
[log] Don't use setFont(), instead supply value in getFont()

Otherwise it may result in artifacts when UI settings change (e.g.
moving to the Presentation Mode and back).

(cherry picked from commit 1b63a2541f1e21108ceece06b65aa2ac9a5b1576)
[log] remove pointless code

(cherry picked from commit 9e5ae50c39ed73ec695de8f16218efc5aff9c502)
[log] rename type parameter to a more descriptive name

(cherry picked from commit 8163d04929fd066a2f88fc3cb2904e9398767dbe)
[log] IDEA-115901 Keep selection between refreshes and filtering

Before updating the model get selected rows, get Hashes by rows.
After the model changes, iterate over its new rows to find all
Hashes which were previously selected and select them by new row
indices.

(cherry picked from commit 7e72b9115201f8cc9b330c8cad6b86fe5a08e9ce)
[log] IDEA-115568 Don't crash if the log is empty

* Make GitLogProvider check if repository is "fresh" (i.e. has no
  commits) and return empty collection of commits/refs instead of
  querying Git which would result in "fatal: bad revision 'HEAD'".
* Let GraphBuilder accept empty list of commits.
* GraphModelImpl: don't send UpdateRequest if the log size is 0:
  no graph modification is possible in this case, and no graph
  modification can lead to this situation.

  [The only exception is: filter by two branches connected with
  AND (i.e. show commits which contain both in branch A and branch B)
  both of which grow from different root commits. Such filtering is
  not possible from the UI now and is not likely to be supported in
  future.]

* VcsLogDataHolder: prevent smartRefresh for empty log (otherwise the
  VcsLogJoiner will fail to attach new commits to the empty log).

(cherry picked from commit c6c69d490e14889324ae4e6d114602e5494b0cbe)
[log] IDEA-115407 Disable graph-only-actions if there is no graph

(cherry picked from commit 7536b4d4f72b83d0285b249b7a1519971d1aae36)
[git] Wrap the VcsException not to loose the cause

Before the stacktrace was taken from the processTerminated and was
rather useless:
VcsException: fatal: bad object b97d4813424a4e75ee1a17c0f2de772359bde26e
	at git4idea.commands.GitSimpleHandler$1.processTerminated
	at sun.reflect.GeneratedMethodAccessor39.invoke
	<...>
	at com.intellij.util.EventDispatcher.dispatch
	at git4idea.commands.GitTextHandler$1.processTerminated
	<...>
	com.intellij.execution.process.ProcessWaitFor$1.run

The fix is to show the stack trace of the code which actually called
the command which failed with exception.

(cherry picked from commit 23583d3a74c095c9551f9800eb9fce408af7968c)
better way to instantiate PersistentHashMap

(cherry picked from commit ee391991e69f92e0f5da971d642cc215ae1fdd49)
[log] Flush & Close persistent enumerator on dispose()

(cherry picked from commit 2beff60bed9f55f004decfec005e0ef500f735df)