$f$ is locally integrable and continuous almost anywhere. Does that guarantee the existence of an interval $(a, b)$ where $f$ is continuous? 
Let's say that $f$ is a function with no removable discontinuities. If $f$
  is locally integrable and continuous almost anywhere, does that
  guarantee the existence of some interval $(a, b)$ with positive length
  where $f$ is continuous?

For example, for the function $f(x) = -1$ for $x < 0$  and $ f(x) = 1$ for everywhere else, $f(x)$ is continuous almost anywhere and locally integrable, and $f(x)$ is continuous on any interval $(a, b)$ that does not contain $0$.
Is this always true?
 A: A. Pongrácz and I came up with this example simultaneously: given an enumeration $q_n$ of the rationals, let $f(x)=\sum_{n:q_n\le x} 2^{-n}$.  This function takes on values between $0$ and $1$, so is locally integrable.  Every rational is a  non-removable discontinuity, so $f$ is a counterexample to the OP's conjecture.
What is a removable discontinuity? A function $f$ has, according to wikipedia, a removable discontinuity at $x$ if the left and right  hand limits of $f(t)$ as $t\to x$ are equal, but unequal to $f(x)$.    A classical example is the function equal to $0$ everywhere except at $0$, where it equals $1$.  The 
left and right hand limits at $0$ are both equal to $0$, but the function itself equals $1$ there.  A classical  example of a function with a non-removable discontinuity at $0$ is the Heaviside function $H(x)$ taking the value $H(x)=0$ for all negative $x$ and the  value $H(x)=1$ for all non-negative $x$.  Here the left and right-hand limits differ, and no redefinition of $H(0)$ makes the function continuous there.
The KL-Pongrácz $f$ is in fact a linear combination of shifts of the Heaviside function: $f(x)=\sum 2^{-n}H(x-q_n)$, which probabilists will recognize as the cumulative distribution function of a discontinuous  random variable $X$ taking on the rational value $q_n$ with probability $P[X=q_n] = 2^{-n}$, so that $f(x)=P[X\le x]$.  Like all cumulative distribution functions it is left-continuous and right-continuous.  The distribution functions of discontinuous random variables have non-removable jump discontinuities at their atoms.  In the case at hand, the jump discontinuity at $q_n$ is of magnitude $2^{-n}$.
A: Here's a classical counterexample,, known as Thomae's function: If $x\in [0,1]$ is rational, write it as $m/n,$ where $m,n\in \mathbb N$ and the fraction is in lowest terms. For such an $x,$ define $f(x)=1/n.$ For irrational $x,$ set $f(x)=0.$ Then $f$ is discontinuous at each rational, continuous at each irrational. So $f$ is continuous a.e., is bounded and integrable, and every interval of positive length contains (many) discontinuities of $f.$
