# Gravitational baryogenesis in non-minimal kinetic coupling model

Parviz Goodarzi<EMAIL_ADDRESS>
Department of Physics, Ayatollah Boroujerdi University, Boroujerd, Iran

###### Abstract

In this work, we consider the gravitational baryogenesis in the framework of
non-minimal derivative coupling model. A mechanism to generate the baryon
asymmetry based on the coupling between the derivative of the Ricci scalar
curvature and the baryon current in context of non-minimal derivative coupling
model is investigated. We show that, in this model, the temperature increases
during the reheating periods to the end of reheating period or beginning of
radiation dominated era. Therefore the reheating temperature is larger then
decoupling temperature. It can be demonstrated that, the evaluation of baryon
asymmetry is not depends on coupling constant. In this model we can generate
baryon asymmetry at low and high reheating temperature, by considering the
high friction constraint.

##  1 Introduction

One of the greatest puzzles in the standard model of cosmology and
astroparticle physics is the dominance of matter against anti-matter in the
Universe. In the other words the number of baryons in the Universe is larger
then the number of antibaryons. The cosmic microwave background radiation [1],
the abundance of the primordial light elements emission from matter-antimatter
annihilation [2] and the big bang nucleosynthesis (BBN) [3], indicate
dominance of matter over antimatter in the Universe. The ratio of baryon
number density $n_{B}$ to the entropy density $s$ is observationally obtained
from the highly precis measurement of the cosmic microwave background
radiation as [4]

$Y_{B}\equiv{n_{B}\over s}=(0.864\pm 0.016)\times 10^{-10}.$ (1)

Sakharov in Ref. [5] showed that baryon asymmetry may be dynamically generated
from the following conditions: (i) processes that violate baryon number; (ii)
violation of charge (C) and charge parity (CP) symmetry; (iii) out of the
thermal equilibrium. This three assumptions are now known as Sakharov
conditions.

Several interesting and applicable mechanisms for generation of baryon
asymmetry which satisfy the above conditions have been proposed. The first
suggestion for this topic used on the out of equilibrium decay of a massive
particle such as a super heavy GUT gauge of Higgs boson where dubbed GUT
baryogenesis [6]. The other mechanism involving the decay of flat directions
in super symmetric models is known as the Affleck-Dine scenario [7]. Also the
possibility of generating the baryon asymmetry at the electro-weak scale has
been considered, these interactions conserve the sum of baryon and lepton
number, which is converted to a baryon asymmetry at the electro-weak scale.
This mechanism is known as lepto-baryogenesis [8]. The spontaneous
baryogenesis has been proposed with the characteristic generation of baryon
asymmetry in thermal equilibrium without the necessity of $C$ and $CP$
violation [9, 10].

Davoudiasl et al. in Supergravity have proposed a mechanism for generating of
the baryon asymmetry on the basis of spontaneous baryogenesis during the
expansion of the Universe (dubbed gravitational baryogensis) [11]. In this
approach they introduced an interaction between derivative of the Ricci scalar
curvature and baryon current $J^{\mu}\partial_{\mu}R$ which dynamically
violate CPT in an expanding Universe. This coupling in the matter dominated
universe and kinetic energy of scalar field dominated it has no problem to
generate correct magnitude of baryon asymmetry but in the radiation dominated
Universe ($\omega=1/3$) it needs to take into account interaction among
massless particles.

During the last years, other scenarios to extend this coupling, has been
receiving a great amount of attention from the many authors. In [12] the
effect of time dependence of the equation of state parameter on gravitational
baryogenesis has been considered.

Gravitational baryogenesis in modified $f(R)$ gravity has been considered in
[13, 14]. Modified gravity theories [15, 16] can easily avoid problem of
generation of baryon asymmetry during radiation dominated Universe, as the
ensuing modified equations of motion can lead to very different relations
between the scalar curvature and temperature. Also gravitational baryogenesis
in context of $f(T)$ theory of gravity [17] with the coupling
$J^{\mu}\partial_{\mu}T$ has been investigated where $T$ is the torsion scalar
[18]. Some variant forms of gravitational baryogenesis containing the partial
derivative of Gauss-Bonnet scalar $\mathcal{G}$ coupled to baryon current
$J^{\mu}\partial_{\mu}\mathcal{G}$ are investigated in [19]. In the case of
Gauss-Bonnet baryogenesise the ratio of baryon number density to entropy is
non-zero in the radiation dominated Universe.

Gravitational baryogenesis with the novel term
$J^{\mu}\partial_{\mu}\mathcal{T}$ in minimal and non-minimal
$f(R,\mathcal{T})$ gravity (where $\mathcal{T}$ denotes the trace of energy-
momentum tensor) have been examined in [20, 21] respectively. They found that
interaction proportional to $\partial_{\mu}\mathcal{T}$ produced unphysical
results.

Baryogenesis in $f(Q,\mathcal{T})$ gravity (where $Q$ denotes the
nonmetricity) with the coupling $J^{\mu}\partial_{\mu}Q$ has been explored and
found results that are consistent with observation [22].

Generalized gravitational baryogenesis in the frameworks of $f(T,T_{G})$ and
$f(T,B)$ (where $T_{G}$ is the teleparallel equivalent to the Gauss-Bonnet
term, $B=2\nabla_{\mu}T^{\mu}$ denotes boundary term between torsion and Ricci
scalar) are discussed in [23, 24]. The authors of these papers have chosen
power-law form of scale factor $a(t)=m_{0}t^{\gamma}$ for each models, and
constructed baryon to entropy ratio by assuming that the universe filled by
perfect fluid and dark energy.

In [25] the baryon asymmetry is generated dynamically during an inflationary
epoch powered by ultra-relativistic particle production. In [26, 27, 28] has
been suggested that anisotropy of the universe can enhance the generation of
the baryon asymmetry. The authors of [28] clarified, if we into account the
gravitino problem $(T_{RD}<10^{9}GeV)$, gravitational baryogenesis [11] is
incapable to explain generation of sufficient baryon asymmetry. They show that
if there exists a huge shear in the radiation dominated era there is a little
possibility of gravitational baryogenesis.

During the last years, the non-minimal derivative coupling model has been
receiving a great amount of attention from the community of theoreticians for
explanation of inflation, structure formations, warm inflation and dark energy
[29, 30, 31]. Therefore, we are interested in investigating the gravitational
baryogenesis mechanism in the framework of non-minimal derivative coupling
model.

Non-minimal derivative coupling
$G_{\mu\nu}\partial^{\mu}\varphi\partial^{\nu}\varphi$ is one of the operators
of Horndeski’s scalar tensor theory [32]. Horndeski’s theory is the most
general scalar-tensor theory having second-order field equations in four
dimensions [33]. Extended scalar-tensor theories of gravity can be obtained by
generalised conformal or disformal transformations of Horndeski and beyond
Horndeski actions [15, 34, 35]. Lagrangian for Horndeski’s theory contains
several operators, where non-minimal derivative coupling has received more
attention among them.

Non-minimal derivative coupling primordially in [36, 37], without introducing
any degree of freedom more then the inflaton and the massless graviton,
violation of quantum gravity bound and violation of unitarity bounds [31],
used to explain Higgs inflation [29].

An emphasize feature of the non-minimal derivative coupling model with the
Einstein tensor is that the mechanism of the gravitationally enhanced friction
during inflation, by which even too steep potentials with theoretically
natural model parameters can drive cosmic acceleration [30, 31]. In
particular, this leads to the range of parameters in which inflationary
attractors exist is greatly expanded.

The reheating process after the slow roll inflation in the non-minimal
derivative coupling model [38, 39, 40, 42, 41] show that, inflaton begins a
coherent rapid oscillation. At the end of slow roll inflation, during
reheating period, inflaton decays to radiation and reheats the Universe. The
temperature of the Universe increases to the end of scalar field dominated in
contrast to the standard reheating in general relativity. This different
behavior of the non-minimal derivative coupling model during the reheating
period makes us interested in investigating the gravitational baryogenesis in
this model.

Thus it is well motivated to propose the gravitational baryogenesis in context
of non-minimal derivative coupling model. In fact, the purpose of the current
work is to investigate gravitational baryogenesis during reheating and
radiation dominated universe in this model and compare results with the
observation. Moreover, the alternative description of the current work, is to
consider the effect of “high friction constraint” on the baryon to entropy
ratio and the values of the model parameters. We would like to investigate the
possibility of baryon asymmetry in the presence of high friction condition in
this model.

We shall demonstrate here, in contrast to the standard gravitation
baryogenesis where could not explain baryon asymmetry in low reheating
temperature [11], in the non-minimal derivative coupling model we can describe
baryon asymmetry in low and high reheating temperature.

The paper is organized as follows: In the section 2 we briefly introduce non-
minimal derivative coupling model and obtain the field equations. In the
section 3 we examine conditions for oscillatory inflation and study the
reheating phase in this model and the temperature at the end of warm inflation
is calculated. In the section 4 we discuss gravitational baryogenesis
scenarios during oscillatory inflaton dominated in the context of non-minimal
derivative coupling model and also we briefly investigate gravitational
baryogenesis scenarios during radiation dominated phase. In the section 5 we
consider the qualitative implication of non-minimal derivative coupling by
calculating the corresponding baryon asymmetry and compare our results with
the observation. In the last section we conclude our results.

We use units $\hbar=c=1$ through the paper.

##  2 Brief review of non-minimal kinetic coupling model

Let us consider the total action of non-minimal kinetic coupling model [29,
30]

$S=\int\Big{(}{M_{P}^{2}\over 2}R-{1\over
2}\Delta^{\mu\nu}\partial_{\mu}\varphi\partial_{\nu}\varphi-V(\varphi)\Big{)}\sqrt{-g}d^{4}x+S_{int}+S_{r}+S_{B},$
(2)

where $\Delta^{\mu\nu}=g^{\mu\nu}+{1\over M^{2}}G^{\mu\nu}$,
$G^{\mu\nu}=R^{\mu\nu}-{1\over 2}Rg^{\mu\nu}$ is the Einstein tensor, $M$ is a
coupling constant with mass dimension, $M_{P}=2.4\times 10^{18}GeV$ is the
reduced Planck mass, $S_{r}$ is the radiation action and $S_{int}$ describes
the interaction of the scalar field with radiation. In order to describe
gravitational baryogenesis, we define action $S_{B}$ by interaction between
derivative of Ricci scalar curvature $\partial_{\mu}R$ and baryon current
$J^{\mu}$ as [11]

$S_{B}={1\over M_{*}^{2}}\int{d^{4}x\sqrt{-g}(\partial_{\mu}R)J^{\mu}},$ (3)

where $M_{*}$ is the cutoff scale of the effective theory. We can obtain
energy momentum tensor by variation of the action (1) with respect to the
metric,

$T_{\mu\nu}=T^{(\varphi)}_{\mu\nu}+T^{(r)}_{\mu\nu}.$ (4)

Where $T^{(r)}_{\mu\nu}$ is the energy momentum tensor for radiation described
as

$T^{(r)}_{\mu\nu}=(\rho_{r}+P_{r})u_{\mu}u_{\nu}+P_{r}g_{\mu\nu},$ (5)

where $u^{\mu}$ is the four-velocity of the radiation and
$T^{(\varphi)}_{\mu\nu}$ is the energy momentum tensor for minimal and non-
minimal coupling counterparts of scalar field as

$\displaystyle T^{(\varphi)}_{\mu\nu}$ $\displaystyle=$
$\displaystyle\nabla_{\mu}\varphi\nabla_{\nu}\varphi-{1\over
2}g_{\mu\nu}{(\nabla\varphi)}^{2}-g_{\mu\nu}V(\varphi)$ $\displaystyle-{1\over
2}G_{\mu\nu}{(\nabla\varphi)}^{2}-{1\over
2}R\nabla_{\mu}\varphi\nabla_{\nu}\varphi+R^{\alpha}_{\mu}\nabla_{\alpha}\varphi\nabla_{\nu}\varphi$
$\displaystyle+R^{\alpha}_{\nu}\nabla_{\alpha}\varphi\nabla_{\mu}\varphi+R_{\mu\alpha\nu\beta}\nabla^{\alpha}\varphi\nabla^{\beta}\varphi+\nabla_{\mu}\nabla^{\alpha}\varphi\nabla_{\nu}\nabla_{\alpha}\varphi$
$\displaystyle-\nabla_{\mu}\nabla^{\nu}\varphi\Box\varphi-{1\over
2}g_{\mu\nu}\nabla^{\alpha}\nabla^{\beta}\varphi\nabla_{\alpha}\nabla_{\beta}\varphi+{1\over
2}g_{\mu\nu}{(\Box\varphi)}^{2}$ $\displaystyle-
g_{\mu\nu}\nabla_{\alpha}\varphi\nabla_{\beta}\varphi R^{\alpha\beta}.$

Energy transfer between the scalar field and radiation is assumed to be [43,
44, 45, 46, 47, 48]

$Q_{\mu}=-\Gamma u^{\nu}\partial_{\mu}\varphi\partial_{\nu}\varphi.$ (7)

Where $\Gamma$ is decay rate of scalar field. In general, $\Gamma$ is a
function of scalar field $\varphi$ and temperature $T$ [44, 49]. The covariant
derivative of energy momentum tensor becomes

$\nabla^{\mu}T^{(r)}_{\mu\nu}=Q_{\nu}\qquad
and\qquad\nabla^{\mu}T^{(\varphi)}_{\mu\nu}=-Q_{\nu}.$ (8)

From relation (8) for scalar field, the equation of motion in the spatially
flat FLRW Universe and in presence of the dissipative term becomes

$\Big{(}1+{3H^{2}\over M^{2}}\Big{)}\ddot{\varphi}+3H\Big{(}1+{3H^{2}\over
M^{2}}+{2\dot{H}\over
M^{2}}\Big{)}\dot{\varphi}+V^{\prime}(\varphi)+\Gamma\dot{\varphi}=0,$ (9)

where $H=\dot{a}/a$ is the Hubble parameter, overdot sign is derivative with
respect to cosmic time $t$, prime is derivative with respect to the scalar
field $\varphi$ and $\Gamma\dot{\varphi}$ is the friction term which describes
the decay of the scalar field to radiation. The Friedmann equations are given
by

$\displaystyle H^{2}$ $\displaystyle=$ $\displaystyle{1\over
3M_{P}^{2}}(\rho_{\varphi}+\rho_{r}),$ (10) $\displaystyle\dot{H}$
$\displaystyle=$ $\displaystyle-{1\over
2M_{P}^{2}}(\rho_{\varphi}+\rho_{r}+P_{\varphi}+P_{r}).$ (11)

Where $\rho_{r}$ and $P_{r}$ are the energy density and the pressure of
radiation, respectively. In the non-minimal derivative coupling model, the
energy density $\rho_{\varphi}$ and the pressure of inflaton field
$P_{\varphi}$ in FRW metric can be expressed as [29, 30]

$\displaystyle\rho_{\varphi}$ $\displaystyle=$ $\displaystyle(1+{9H^{2}\over
M^{2}}){\dot{\varphi}^{2}\over 2}+V(\varphi),$ (12) $\displaystyle
P_{\varphi}$ $\displaystyle=$ $\displaystyle(1-{3H^{2}\over
M^{2}}-{2\dot{H}\over M^{2}}){\dot{\varphi}^{2}\over
2}-V(\varphi)-{2H\dot{\varphi}\ddot{\varphi}\over M^{2}}.$ (13)

Moreover, we can write energy density of radiation as a function of
temperature $T$ and entropy density $s$, $\rho_{r}=(3/4)Ts$ [44]. Using the
equation of state parameter for radiation $\omega_{r}=1/3$, the evolution
equation of energy density of radiation and scalar field becomes

$\displaystyle\dot{\rho_{r}}+4H\rho_{r}$ $\displaystyle=$
$\displaystyle\Gamma{\dot{\varphi}}^{2},$ (14)
$\displaystyle\dot{\rho_{\varphi}}+3H(\rho_{\varphi}+P_{\varphi})$
$\displaystyle=$ $\displaystyle-\Gamma{\dot{\varphi}}^{2}.$ (15)

##  3 Reheating after inflation

Figure 1:  The admissible region of decoupling temperature ${T_{D}}$ and
reheating temperature $T_{RD}$ from high friction condition, in the case that
decoupling take place during the reheating era for quadratic inflationary
potential ($q=2$) and dimension-6 B-violating interaction ($n=2$). We assumes
coupling constant $M=10^{-8}M_{p}$ and different values of $C$. The allowed
regions $(C>10)$ are restricted to the dark brown. The bright colors of the
region represent low values while the dark colors represent high values of
$C$.

Figure 2:  Comparison high friction condition for different values of coupling
constant $M$ from equation (49). In the case that decoupling take place during
the reheating era for quadratic inflationary potential ($q=2$), dimension-6
B-violating interaction ($n=2$) and $C=1$.

In this section we will consider reheating of the Universe after the end of
slow-roll inflation. At the end of inflation, oscillation of the scalar field
about the bottom of potential begins. We assume that the potential is even,
$V(-\varphi)=V(\varphi)$, and consider rapid oscillating solution to equation
(9) around $\varphi=0$. The inflaton energy density may estimated as
$\rho_{\varphi}=V(\Phi(t))$, where $\Phi(t)$ is the amplitude of inflaton
oscillation. In this epoch $\rho_{\varphi}$ and $H$ change insignificantly
during a period of oscillation [39, 40].

In the rapid oscillation of the scalar field epoch, the adiabatic index
defined by
$\gamma=\big{<}{\rho_{\varphi}+P_{\varphi}\over\rho_{\varphi}}\big{>}$, where
bracket denotes the time average over an oscillation cycle. Now, for a power
law potential

$V(\varphi)=\lambda\varphi^{q},$ (16)

at the high friction limit $(H^{2}/M^{2}\gg 1)$, adiabatic index becomes [40]

$\gamma\approx{2q\over 3q+6}.$ (17)

Therefore, if we take the time average of both sides of the continuity
equation (14), we can write [42]

${d\over
dt}\big{<}\rho_{\varphi}\big{>}+3H\gamma\big{<}\rho_{\varphi}\big{>}+{\gamma\Gamma
M^{2}\over 3H^{2}}\big{<}\rho_{\varphi}\big{>}=0.$ (18)

We can simply derive the average of energy density of scalar field
$\big{<}\rho_{\varphi}\big{>}$ at the high friction limit and $\Gamma M^{2}\ll
3H^{3}$ constrain as

$\big{<}\rho_{\varphi}\big{>}\propto a(t)^{-3\gamma}.$ (19)

By using relation (19) and Friedmann equation (10), in the scalar field
dominated era, we can obtain scale factor as a function of the cosmic time

$a(t)\propto t^{{q+2\over q}}\propto t^{{2\over 3\gamma}}.$ (20)

Therefore, the Hubble parameter in the energy density of scalar field
dominated era, can be estimated as $H\approx 2/(3\gamma t)$. In the rapid
oscillation phase, for the power law potential (16), we can calculate the
amplitude of the oscillations of scalar field as

$\phi(t)\propto a(t)^{-{2\over q+2}}\propto t^{-{2\over q}}.$ (21)

We have seen at high friction limit
$\big{<}\dot{\varphi}^{2}\big{>}\approx\gamma M_{P}^{2}M^{2}$ is nearly
constant. Therefore from equations (14) and (16) we can calculate evolution of
radiation and scalar field energy density as

$\displaystyle\rho_{r}$ $\displaystyle=$
$\displaystyle{3\Gamma\gamma^{2}M^{2}M_{P}^{2}\over(8+3\gamma)}t\bigg{[}1-({t_{o}\over
t})^{(1+{8\over 3\gamma})}\bigg{]},$ (22) $\displaystyle\rho_{\varphi}$
$\displaystyle=$ $\displaystyle\rho_{o}\Big{(}{t_{o}\over
t}\Big{)}^{2}\exp{\Big{[}-\Big{(}{\Gamma\gamma^{3}M^{2}\over
4}\Big{)}(t^{3}-t_{o}^{3})\Big{]}},$ (23)

where $t_{o}$ is the beginning of scalar field rapid oscillation, which
$\rho_{r}(t=t_{o})=0$ and $\rho_{o}=\rho_{\varphi}(t_{o})$. In the rapid
oscillation phase, energy density of radiation increases slowly and energy
density of scalar field decreases, so that at the time $t_{RD}$ the energy
density of radiation becomes equal to the scalar field
$\rho_{r}(t_{RD})\approx\rho_{\varphi}(t_{RD})$. From equations (22) and (10)
we can calculate $t_{RD}$ as [40, 42]

${t_{RD}}^{3}\approx{4(8+3\gamma)\over 9\Gamma\gamma^{4}M^{2}}.$ (24)

We can write energy density of radiation as a function of reheating
temperature $T_{RD}$ as [43]

$\rho_{r}(t_{RD})=g_{\star}{\pi^{2}\over 30}T_{RD}^{4},$ (25)

where $g_{\star}$ is the number of degree of freedom at the reheating
temperature and $T_{RD}$ is the temperature of radiation at the beginning of
radiation dominated era. Therefore the temperature of the universe at the
beginning of radiation dominated universe becomes

${T_{RD}}^{4}\approx{30M_{P}^{2}\over\pi^{2}g_{\star}}\bigg{[}{12\Gamma^{2}\gamma^{2}M^{4}\over{(8+3\gamma)}^{2}}\bigg{]}^{1\over
3}.$ (26)

##  4 Gravitational baryogenesis

In order to examine the effect of non-minimal derivative coupling and the high
friction condition on the baryon asymmetry, in the present work, we consider
the baryon number-to-entropy ratio during reheating era and radiation
dominated period.

Figure 3:  Decoupling temperature ${T_{D}}$ in terms of reheating temperature
$T_{RD}$, for coupling constant $M=10^{-8}M_{p}$ and high reheating
temperature. The blue, green and red dashed curves correspond to different
values of cutoff scale $M_{\star}$, to explain the observed baryon asymmetry
($Y_{B}=8.64\times 10^{-11}$). The solid black curve correspond to “decoupling
of B-violating processes” with $M_{B}=10^{-4}M_{p}$. In the case that
decoupling take place during the reheating era for quadratic inflationary
potential ($q=2$) and dimension-6 B-violating interaction ($n=2$).The
admissible regions for decoupling temperature and reheating temperature are
displayed with a brown color spectrum, from high friction condition.
Intersection of the dashed curves and solid curve are the points where
defines, $T_{RD}$ and ${T_{D}}$.

Figure 4:  Decoupling temperature ${T_{D}}$ in terms of reheating temperature
$T_{RD}$, for coupling constant $M=10^{-14}M_{p}$ and low reheating
temperature. The blue, green and red dashed curves correspond to different
values of cutoff scale $M_{\star}$, to explain the observed baryon asymmetry
($Y_{B}=8.64\times 10^{-11}$) in relation (50). The solid black curve
correspond to “decoupling of B-violating processes” with
$M_{B}=10^{-12}M_{p}$. In the case that decoupling take place during the
reheating era for quadratic inflationary potential ($q=2$) and dimension-6
B-violating interaction ($n=2$). The admissible regions for decoupling
temperature and reheating temperature are displayed with a brown color
spectrum, from high friction condition. Intersection of the dashed curves and
solid curve are the points where defines, $T_{RD}$ and ${T_{D}}$.

###  4.1 Reheating period

During the reheating era, the scalar field oscillates about minimum of
potential and decays to ultra relativistic particles. In this period the
energy density of oscillatory scalar field is dominated and the Universe
expansion is accelerated. In this period we can rewrite the equation (20) in
the form of

$a(t)=a_{RD}\bigg{(}{t\over t_{RD}}\bigg{)}^{2\over 3\gamma},$ (27)

where $a_{RD}$ is scale factor at the beginning of the radiation dominated era
$t_{RD}$. The evolution of the energy density of radiation during the rapid
oscillation of scalar field from relation (14) becomes

${d\over dt}(a^{4}\rho_{r})\approx-3\Gamma\gamma
M^{2}M_{P}^{2}a^{4}\Rightarrow\rho_{r}\propto a^{3\gamma\over 2}.$ (28)

Therefore we can write the energy density of radiation as a function of scale
factor as

$\rho_{r}={g_{\star}\pi^{2}\over 30}T_{RD}^{4}\bigg{(}{a\over
a_{RD}}\bigg{)}^{3\gamma\over 2},$ (29)

where $(g_{\star}\pi^{2}/30)T_{RD}^{4}$ is energy density of radiation at the
$t_{RD}$. From relation (19) and the radiation-scalar field equality
$\rho_{\varphi}(t_{RD})=\rho_{r}(t_{RD})$, the energy density of scalar field
is given by

$\rho_{\varphi}={g_{\star}\pi^{2}\over 30}T_{RD}^{4}\bigg{(}{a\over
a_{RD}}\bigg{)}^{-3\gamma}.$ (30)

From relation (29) and Fridmann equation (10), during reheating period, we can
calculate evolution of scale factor as a function of temperature as

$a=a_{RD}\bigg{(}{T\over T_{RD}}\bigg{)}^{8\over 3\gamma}.$ (31)

This relation show that in the non-minimal derivative coupling model, the
temperature of Universe increases by expansion of the Universe until beginning
of radiation dominated period. While in the standard thermal history of the
Universe, temperature had opposite evolution. By replacement of relation (31)
into equation (30) the energy density of inflaton field becomes

$\rho_{\varphi}=g_{\star}{\pi^{2}\over 30}\bigg{(}{T_{RD}^{12}\over
T^{8}}\bigg{)}.$ (32)

If there exist B-violating interaction in thermal equilibrium then it can
generate net baryon asymmetry. In the expanding Universe From action (3) we
have [11, 28]

${1\over M_{\star}}(\partial_{\mu})J^{\mu}={\dot{R}\over
M_{\star}^{2}}(g_{b}n_{b}+g_{\bar{b}}n_{\bar{b}}),$ (33)

where $g_{b}=-g_{\bar{b}}$ denotes the number of intrinsic degree of freedom
of baryons. $n_{b}$ and $n_{\bar{b}}$ are the number densities of baryon and
antibaryon respectively. An effective chemical potential follow as
$\mu_{b}=-\mu_{\bar{b}}=g_{b}\dot{R}/M_{\star}^{2}$, the entropy density of
the Universe is given by $s=2\pi^{2}g_{\star}T^{3}/45$, the baryon number
density, in thermal equilibrium, becomes
$n_{B}=(g_{b}n_{b}+g_{\bar{b}}n_{\bar{b}})=-g_{b}\mu_{b}T^{2}/6$ [50]. As a
result, we can write the baryon to entropy ratio (baryon asymmetry) in an
accelerating universe as

$Y_{B}\equiv{n_{B}\over s}\approx-{15g_{b}^{2}\over
4\pi^{2}g_{\star}}{\dot{R}\over M_{\star}^{2}T}\Big{|}_{T=T_{D}},$ (34)

where temperature $T_{D}$ is the temperature of the Universe at which the
baryon current violation decouples. In the spatially flat FLRW metric, of the
form,

$ds^{2}=-dt^{2}+a(t)^{2}\sum(dx^{i})^{2},$ (35)

Ricci scalar curvature $R$ is equal to

$R=-6(\dot{H}+2H^{2}),$ (36)

by using equation (31) for the scale factor, easily we can calculate Ricci
scalar curvature as a function of cosmic time as

$R=4\Big{(}{4-3\gamma\over 3\gamma^{2}}\Big{)}t^{-2}.$ (37)

Now, with the time derivative of Ricci scalar curvature (37) and Fridmann
equation $H^{2}\approx\rho_{\varphi}/(3M_{p}^{2})$ in the scalar field
dominated period, we have

$\dot{R}\approx-\sqrt{3}\gamma(4-3\gamma){\rho_{\varphi}^{3\over 2}\over
M_{p}^{3}}.$ (38)

Finally, by substituting $\dot{R}$ and $\rho_{\varphi}$ from equations (38)
and (32) into equation (34), we obtain baryon asymmetry $Y_{B}$ as a function
of Universe temperature

$Y_{B}\equiv{n_{B}\over
s}\approx{\pi\gamma(4-3\gamma)g_{b}^{2}\sqrt{g_{\star}}\over
8\sqrt{10}}{T_{RD}^{18}\over M_{p}^{3}M_{\star}^{2}T^{13}}\Big{|}_{T=T_{D}}.$
(39)

We continue with a brief mention of the origin of the B-violating interaction
that is indispensable for any baryogenesis scenario. We assume that
B-violating interactions, which are given by an operator $\mathcal{O}_{B}$ of
mass dimension $D=4+n$ [11, 28]. We need $n>0$ for the B-violating
interaction. In the B-violating interactions, coupling constants are
proportional to $M_{B}^{-n}$, where $M_{B}$ is the mass scale, the rate of
generation of B-violating interaction in thermal equilibrium with the
temperature $T$ can be cast in the form [11]

$\Gamma_{B}={T^{2n+1}\over M_{B}^{2n}}.$ (40)

Decoupling of B-violating processes occurs at $T=T_{D}$, when $\Gamma$ falls
below $H={2/3\gamma t}$. Therefore we can obtain temperature of decoupling
from equation (32) as

$T_{D}=\Bigg{(}{\pi\sqrt{g_{\star}}M_{B}^{2n}\over
3\sqrt{10}M_{p}}\Bigg{)}^{1\over 2n+5}T_{RD}^{6\over 2n+5}.$ (41)

Therefore by substituting of relation (41) into equation (39) we have

$Y_{B}\approx\Big{(}{3\gamma(4-3\gamma)g_{b}^{2}\over
8}\Big{)}\Big{(}{\pi^{2}g_{\star}\over 90}\Big{)}^{\big{(}{n-4\over
2n+5}\big{)}}{T_{RD}^{12\big{(}{3n+1\over 2n+5}\big{)}}\over
M_{\star}^{2}M_{p}^{2\big{(}{3n+1\over 2n+5}\big{)}}M_{B}^{\big{(}{26n\over
2n+5}\big{)}}}.$ (42)

From high friction condition $H^{2}/M^{2}\gg 1$ we can constrain the
decoupling temperatures $T_{D}$ as

$MM_{p}T_{D}^{4}\ll\sqrt{{g_{\star}\pi^{2}\over 90}}T_{RD}^{6}.$ (43)

Contrary to minimal coupling model, we have seen during the oscillatory scalar
field dominated universe for $\gamma=1/3$ the temperature of the universe
increases as $T\approx T_{RD}\big{(}a(t)/a_{RD}\big{)}^{(1/8)}$. Therefore,
the decoupling temperature $T_{D}$ is smaller than the reheating temperature
$T_{RD}$, in pleasant accordance with the condition (43).

Figure 5:  Decoupling temperature ${T_{D}}$ in terms of reheating temperature
$T_{RD}$, for coupling constant $M=10^{-8}M_{p}$ and high reheating
temperature. The blue and red dashed curves correspond to different values of
$M_{B}$ in ”decoupling of B-violating processes”. The solid black curve
correspond to cutoff scale $M_{\star}=10^{-1}M_{p}$, to explain the observed
baryon asymmetry ($Y_{B}=8.64\times 10^{-11}$). In the case that decoupling
take place during the reheating era for quadratic inflationary potential
($q=2$) and dimension-6 B-violating interaction ($n=2$). The admissible
regions for decoupling temperature and reheating temperature are displayed
with a brown color spectrum, from high friction condition. Intersection of the
dashed curves and solid curve are the points where defines, $T_{RD}$ and
${T_{D}}$.

Figure 6:  Decoupling temperature ${T_{D}}$ in terms of reheating temperature
$T_{RD}$, for coupling constant $M=10^{-14}M_{p}$ and low reheating
temperature. The blue and red dashed curves correspond to different values of
$M_{B}$ in ”decoupling of B-violating processes”. The solid black curve
correspond to cutoff scale $M_{\star}=10^{-9}M_{p}$, to explain the observed
baryon asymmetry ($Y_{B}=8.64\times 10^{-11}$). In the case that decoupling
take place during the reheating era for quadratic inflationary potential
($q=2$) and dimension-6 B-violating interaction ($n=2$). The admissible
regions for decoupling temperature and reheating temperature are displayed
with a brown color spectrum, from high friction condition. Intersection of the
dashed curves and solid curve are the points where defines, $T_{RD}$ and
${T_{D}}$.

###  4.2 Radiation dominated period

In this section we consider the gravitational baryogenesis during the
radiation dominated era after the reheating period. The challenge of
gravitational baryogenesis during radiation dominated universe is
characterised by equation of state $\omega\approx 1/3$. If $\omega$ were equal
to $1/3$ exactly, then $R=3(1-3\omega)H^{2}$ would vanish and $Y_{B}=0$. Then
the baryon asymmetry effect would never be generated during the radiation
dominated era. If we look more closely at the problem, it is not so serious,
so that if we take into account the effect of interactions among massless
particles lead to trace anomaly that make $T_{\mu}^{\mu}\neq 0$. Therefore the
equation of state is given by $1-3\omega\sim 10^{-2}-10^{-1}$ [11, 28].

In the radiation dominated era $a\propto\sqrt{t}$, $\rho_{r}\propto a^{-4}$,
$H\approx 1/2t$ and by relation $\rho_{r}=(\pi^{2}g_{\star}/30)T^{4}$ we
arrive at

$T^{2}={3\sqrt{10}M_{p}\over 2\pi\sqrt{g_{\star}}}t^{-1}.$ (44)

We can calculate the time of decoupling by equality $\Gamma=H$, as
$t_{D}\approx M_{B}^{2n}/2T_{D}^{2n+1}$, and the temperature of decoupling
becomes

$T_{D}^{2n-1}\approx{\pi M_{B}^{2n}\sqrt{g_{\star}}\over 3\sqrt{10}M_{p}}.$
(45)

By using Fridmann equation during of radiation dominated era
$H^{2}\approx\rho_{r}/3M_{p}^{2}$ we have $R=3(1-3\omega)(1/4t^{2})$,
therefore baryon asymmetry reads

$Y_{B}\approx{g_{b}^{2}\over 2}\Big{(}{\pi^{2}g_{\star}\over
90}\Big{)}^{\big{(}{n+2\over
2n-1}\big{)}}(1-3\omega)M_{\star}^{-2}M_{p}^{-\big{(}{6n+2\over
2n-1}\big{)}}M_{B}^{\big{(}{10n\over 2n-1}\big{)}}.$ (46)

Hence, by choosing dimension-6 B-violating interaction ($n=2$) and
$g_{\star}=106$ we have

$Y_{B}\approx 13(1-3\omega)M_{\star}^{-2}M_{p}^{-\big{(}{14\over
3}\big{)}}M_{B}^{\big{(}{20\over 3}\big{)}}.$ (47)

Similarly, by choosing dimension-5 B-violating interaction ($n=1$) we have

$Y_{B}\approx 785(1-3\omega)M_{\star}^{-2}M_{p}^{-8}M_{B}^{10}.$ (48)

##  5 numerical analysis

Figure 7:  The acceptable range for $M_{\star}$ and $M_{B}$ to explain the
observed baryon asymmetry ($Y_{B}=8.64\times 10^{-11}$). The solid blue curve,
correspond to dimension-6 B-violating interaction ($n=2$) and red dashed curve
dimension-5 B-violating interaction ($n=1$). We assume that reheating
temperature is $T_{RD}=10^{-9}M_{p}$ and the golden region show the
$T_{RD}<10^{-9}M_{p}$.

As we have shown in the previous section, the value of reheating temperature
$T_{RD}$ is depends on coupling constant $M$. On the other hand, high friction
condition, constrain the reheating temperature. To display high friction
condition $H^{2}/M^{2}\gg 1$ in our plots, we can parameterize relation (43)
as

$1\ll C\equiv\sqrt{{g_{\star}\pi^{2}\over 90}}{T_{RD}^{6}\over
MM_{p}T_{D}^{4}}.$ (49)

As we can see, this constraint not only does not depend on $q$ and $n$
parameters, but also it depends only on coupling constant $M$. Therefore, for
any value of coupling constant $M$, we must chose $T_{D}$ and $T_{RD}$ where
satisfy in this condition. In all of the plots Figure 1-Figure 6, decoupling
take place during the reheating era for quadratic inflationary potential
($q=2$ or $\gamma=1/3$). Also, we assume that dimension-6 B-violating
interaction ($n=2$), the ultra relativistic degrees of freedom at the
electroweak energy scale $g_{\star}=106.75$, the number of intrinsic degree of
freedom of baryons $g_{b}\approx\mathcal{O}(1)$.

In Figure 1 the admissible region of decoupling temperature ${T_{D}}$ and
reheating temperature $T_{RD}$ from high friction condition, in the case that
decoupling take place during the reheating era for quadratic inflationary
potential ($q=2$), dimension-6 B-violating interaction ($n=2$), coupling
constant $M=10^{-8}M_{p}$, and different values of $C$ has been depicted. As a
reference, the acceptable regions are $C>10$ where displayed by the brown
color. So the region $C<1$ is out of bounds and the values of reheating
temperature and decoupling temperature in this region violate the high
friction condition. The bright colors represent low values while the dark
colors represent high values for $C$.

We can rewrite relation (39), (41) and (42) for $\gamma=1/3$ and $n=2$, in the
form of

$Y_{B}\approx{3\over 8}\Bigg{(}{\pi\sqrt{g_{\star}}\over
3\sqrt{10}}\Bigg{)}{T_{RD}^{18}\over M_{p}^{3}M_{\star}^{2}T_{D}^{13}},$ (50)

$T_{D}\approx\Bigg{(}{\pi\sqrt{g_{\star}}\over
3\sqrt{10}}\Bigg{)}^{1/9}{M_{B}^{4/9}\over M_{p}^{1/9}}T_{RD}^{2/3},$ (51)

$Y_{B}\approx{3\over 8}\Bigg{(}{\pi\sqrt{g_{\star}}\over
3\sqrt{10}}\Bigg{)}^{(-4/9)}{T_{RD}^{28/3}\over
M_{\star}^{2}M_{p}^{14/9}M_{B}^{52/9}}.$ (52)

In Figure 2 high friction condition (49) for different values of coupling
constant $M$ has been depicted. Clearly, as the coupling constant $M$ is
decreased, the acceptable region for $T_{RD}$ and $T_{D}$ associated with high
temperature and vice versa.

Figure 3 shows decoupling temperature ${T_{D}}$ in terms of reheating
temperature $T_{RD}$, for coupling constant $M=10^{-8}M_{p}$. The blue, green
and red dashed curves correspond to different values of cutoff scale
$M_{\star}$, to explain the observed baryon asymmetry ($Y_{B}=8.64\times
10^{-11}$) in relation (50). The solid black curve correspond to ”decoupling
of B-violating processes” with $M_{B}=10^{-4}M_{p}$ in relation (51). The
admissible regions for decoupling temperature and reheating temperature are
displayed with a brown color spectrum, from high friction condition.
Intersection of the dashed curves and solid curve are the points where
defines, $T_{RD}$ and ${T_{D}}$. We have seen, intersection points take place
in admissible regions $C>100$ and $C>1000$. Therefore, if we want to explain,
generation of baryon asymmetry in high reheating temperature, then we have to
choose higher values of $M_{\star}$ and $M_{B}$.

Therefore more appropriate choices, are larger cutoff scale $M_{\star}$ which
fall into the dark eras.

The Figure 4 is similar to Figure 3, but we drawing this plot for low
reheating temperature and different parameters values. We have seen, if we
want to explain, generation of baryon asymmetry in low reheating temperature,
then we have to choose smaller values of $M_{\star}$, $M_{B}$ and $M$.

The Figure 5 shows decoupling temperature ${T_{D}}$ in terms of reheating
temperature $T_{RD}$, for coupling constant $M=10^{-8}M_{p}$ and high
reheating temperature. The blue and red dashed curves correspond to different
values of $M_{B}$ in ”decoupling of B-violating processes” in relation (51).
The solid black curve correspond to cutoff scale $M_{\star}=10^{-1}M_{p}$, to
explain the observed baryon asymmetry ($Y_{B}=8.64\times 10^{-11}$) in
relation (50). The admissible regions for decoupling temperature and reheating
temperature are displayed with a brown color spectrum, from high friction
condition. Intersection of the dashed curves and solid curve are the points
where defines, $T_{RD}$ and ${T_{D}}$ where satisfy in relations (50), (51)
and high friction condition. We have seen, intersection points take place in
admissible regions $C>100$.

The Figure 6 is similar to Figure 5, but we drawing this plot for low
reheating temperature and different parameters values. We have seen, if we
want to explain, generation of baryon asymmetry in low reheating temperature,
then we have to choose smaller values of $M_{\star}$, $M_{B}$ and $M$.

The Figure 7, the acceptable range for $M_{\star}$ and $M_{B}$ to explain the
observed baryon asymmetry ($Y_{B}=8.64\times 10^{-11}$) has been depicted. The
solid blue curve, correspond to dimension-6 B-violating interaction ($n=2$)
and red dashed curve dimension-5 B-violating interaction ($n=1$). We assume
that reheating temperature is $T_{RD}=10^{-9}M_{p}$ and the golden region show
the $T_{RD}<10^{-9}M_{p}$.

We conclude that in non-minimal derivative coupling model, sufficient baryon
asymmetry has been generated in low and high reheating temperature during
reheating phase.

##  6 Conclusion

In this paper, We investigated the gravitational baryogenesis mechanism in the
non-minimal derivative coupling model in high friction regime. We used
coupling between derivative of Ricci scalar curvature and baryon current to
describe baryon asymmetry. In this model, inflaton begins a coherent rapid
oscillation, after the slow roll inflation. During this stage, inflaton decays
to radiation and reheats the Universe. We calculated the baryon to entropy
ratio in the case that reheating period described by coherent rapid
oscillation in the non-minimal derivative coupling model. Moreover this model
has the additional constraint, where we have to choose the parameters of the
model in such a way that it satisfies this additional constraint. We examine
this condition in all of plots. As we demonstrated, in contrast to the
standard gravitation baryogenesis where could not explain baryon asymmetry in
low reheating temperature, in the non-minimal derivative coupling model we can
describe baryon asymmetry in low and high reheating temperature.

## References

  * [1] C. L. Bennett et al. [WMAP Collaboration], Astrophys. J. Suppl. 148, 1 (2003).
  * [2] Andrew G. Cohen, A. De Rujula, S.L. Glashow, Astrophys. J. 495, 539 (1998).
  * [3] Cyburt, Richard H. et al. Rev.Mod.Phys. 88 (2016) 015004.
  * [4] Planck 2015 results. XIII. Cosmological parameters - Planck Collaboration (Ade, P.A.R. et al.) Astron.Astrophys. 594 (2016) A13.
  * [5] A. D. Sakharov, JETP Lett. 5, 24 (1967).
  * [6] S. Weinberg, Phys. Rev. Lett. 42, 850 (1979).
  * [7] I. Affleck and M. Dine, Nucl. Phys. B249, 361 (1985).
  * [8] M. Fukugita and T. Yanagida, Phys. Lett. B174, 45 (1986).
  * [9] A. Cohen, D. Kaplan, 1987, Phys. Lett. B, 199, 251.
  * [10] A. Cohen, D. Kaplan, A.E. Nelson, 1991, Phys. Lett. B, 263, 86.
  * [11] H. Davoudiasl, R. Kitano, G. D. Kribs, H. Murayama and P. J. Steinhardt, Phys. Rev. Lett. 93, 201301 (2004).
  * [12] H. Mohseni Sadjadi,:Phys. Rev. D 76, 123507 (2007).
  * [13] G. Lambiase, G. Scarpetta, Phys. Rev. D 74, 087504 (2006).
  * [14] M. P. L. P. Ramos and J. Paramos, Phys. Rev. D 96, 104024 (2017).
  * [15] S. Nojiri, S. D. Odintsov, Int. J. Geom. Meth. Mod. Phys. 4 (2007) 115.
  * [16] Salvatore Capozziello, Mariafelicia De Laurentis, Physics Reports, 509, 167, (2011).
  * [17] Salvatore Capozziello, Rocco D’Agostino, Orlando Luongo, Int.J.Mod.Phys.D 28 (2019) 10, 1930016.
  * [18] V. K. Oikonomou and Emmanuel N. Saridakis, Phys. Rev. D 94, 124005, (2016).
  * [19] S.D. Odintsov, V.K. Oikonomou, Phys. Lett. B 760 (2016) 259-262.
  * [20] E. H. Baffou, M. J. S. Houndjo, D. A. Kanfon and I. G. Salako, Eur. Phys. J. C 79 (2019) 112.
  * [21] P.K. Sahoo, Snehasish Bhattacharjee, Int. J. Theor. Phys. 59 (2020) 1451.
  * [22] Snehasish Bhattacharjee, P.K. Sahoo, Eur.Phys.J.C 80 (2020) 3, 289.
  * [23] Nadeem Azhar, Abdul Jawad, Shamaila Rani, Phys.Dark Univ. 30 (2020) 100724.
  * [24] Kourosh Nozari, Fateme Rajabi,Commun.Theor.Phys. 70 (2018) 4, 451.
  * [25] J.A.S. Lima, D. Singleton, Physics Letters B 762 (2016) 506–511.
  * [26] Kh. Saaidi and H. Hossienkhani, Astrophys. Space Sci. 333, 305 (2011).
  * [27] A. Aghamohammadi, H. Hossienkhani, Kh. Saaidi, Mod.Phys.Lett.A 33 (2018) 13, 1850072.
  * [28] Mitsuhiro Fukushima, Shuntaro Mizuno, Kei-ichi Maeda, Phys. Rev. D 93, 103513 (2016).
  * [29] C. Germani and A. Kehagias, Phys. Rev. Lett. 105 (2010) 011302.
  * [30] C. Germani and A. Kehagias, JCAP 05 (2010) 019.
  * [31] C. Germani and Y. Watanabe, JCAP 07 (2011) 031.
  * [32] G.W. Horndeski, Int. J. Theor. Phys. 10 (1974) 363.
  * [33] Tsutomu Kobayashi, Rep. Prog. Phys. 82, 086901 (2019).
  * [34] Shin’ichi Nojiri, Sergei D. Odintsov, Phys. Rept. 505 (2011) 59-144.
  * [35] X. Gao, Phys. Rev. D 90 (2014) 081501.
  * [36] L. Amendola, Phys. Lett. B 301, 175 (1993).
  * [37] C. Charmousis, E.J. Copeland, A. Padilla and P.M. Saffin, Phys. Rev. Lett. 108 (2012) 051101.
  * [38] H. M. Sadjadi, P. Goodarzi, Phys. Lett. B 732, 278 (2014).
  * [39] H. M. Sadjadi, P. Goodarzi , JCAP 02, 038, (2013).
  * [40] H. M. Sadjadi, P. Goodarzi, JCAP 07, 039 (2013).
  * [41] K. Nozari, M. Shoukrani, and N. Rashidi, Adv. High Energy Phys. 2014, 343819 (2014);
  * [42] H. M. Sadjadi, P. Goodarzi, Eur. Phys. J. C 75, 513 (2015);
  * [43] A. Berera, Phys. Rev.Lett. 75,3218,(1995); A. Berera, L. Z. Fang, Phys. Rev. Lett. 74,1912,(1995); Y. Gim and W. Kim, arXiv:1608.07466.
  * [44] A. Berera, Nucl. Phys. B 585, 666 (2000).
  * [45] L. M. H. Hall, I.G. Moss, and A. Berera, Phys. Rev. D 69,083525 (2004).
  * [46] M. Bastero-Gil, A. Berera, R. O. Ramos and J. G. Rosa, Phys. Lett. B 712, 425 (2012).
  * [47] S. del Campo, R. Herrera and D. Pavon, Phys. Rev. D 75, 083518 (2007).
  * [48] R. Herrera, S. del Campo and C. Campuzano, JCAP 10, 009 (2006).
  * [49] X. M. Zhang, J. Y. Zhu, Phys. Rev. D 87.043522(2013).
  * [50] E. Kolb, M.Turner, The Early Universe (Addison-Wesley Publishing Company, Redwood City, California, 1990).
  * [51] A. H. Guth, Phys. Rev. D 23, 347 (1981).
  * [52] A. Linde, Particle Physics and Inflationary Cosmology (Harwood, Chur, Switzerland, 1990).
  * [53] A. Liddle and A. Mazumder, Phys. Rev. D 58, 083508 (1996).
  * [54] X. M. Zhang, J. Y. Zhu, Phys. Rev. D 87, 043522 (2013).


# Improving Quality of a Post’s Set of Answers in Stack Overflow

Mohammadreza Tavakoli  Computer Engineering
Sharif University of Technology
<EMAIL_ADDRESS>Maliheh Izadi  Computer Engineering
Sharif University of Technology
<EMAIL_ADDRESS>Abbas Heydarnoori  Computer Engineering
Sharif University of Technology
<EMAIL_ADDRESS>
###### Abstract

Community Question Answering platforms such as Stack Overflow help a wide
range of users solve their challenges on-line. As the popularity of these
communities has grown over the years, both the number of members and posts
have escalated. Also, due to the diverse backgrounds, skills, expertise, and
viewpoints of users, each question may obtain more than one answers.
Therefore, the focus has changed toward producing posts that have a set of
answers more valuable for the community as a whole, not just one accepted-
answer aimed at satisfying only the question-asker. Same as every universal
community, a large number of low-quality posts on Stack Overflow require
improvement. We call these posts “deficient”, and define them as posts with
questions that either have no answer yet or can be improved by other ones. In
this paper, we propose an approach to automate the identification process of
such posts and boost their set of answers, utilizing the help of related
experts. With the help of 60 participants, we trained a classification model
to identify deficient posts by investigating the relationship between
characteristics of 3075 questions posted on Stack Overflow and their need for
better answers set. Then, we developed an Eclipse plugin named SOPI and
integrated the prediction model in the plugin to link these deficient posts to
related developers (in terms of their development context and expertise area)
and help them improve the answer set. We evaluated both the functionality of
our plugin and the impact of answers submitted to Stack Overflow with the help
of 10 and 15 expert industrial developers, respectively. Our results indicate
that decision trees, specifically the J48 algorithm, predicts a deficient
question better than the other methods with 94.5% precision and 90.3% recall.
We conclude that not only our plugin helps programmers contribute more easily
to Stack Overflow, but also it improves the quality of existing answers.

###### Index Terms:

Question Answering, Recommender systems

##  I Introduction

Stack Overflow (SO) is a successful example of Community Question and
Answering (CQA) platform, specifically designed for solving programmers’ and
software engineers’ challenges. According to the 2019 global survey of SO,
approximately 50M people visit SO monthly. Professional developers and
university-level students cover 42% of these visits111SO Survey 2019:
https://insights.stackoverflow.com/survey/2019. As of October 2019, about 18M
questions have been posted on SO. Approximately, users have posted 28M answers
to these questions, from which only 9.6M answers have been accepted. SO also
reports users post on average 7.9K new questions and 8.1K new answers each
working day222This data has been updated on Oct, 14th, 2019 using Stack
Exchange API. Although some questions have no answer, others receive numerous
ones. This shows the difference between users’ views and usage types, thus
emphasising the importance of constructing high-quality answer sets.

On the other hand, due to the fast-growing community of SO and the inability
to carefully assess the content being published, a large number of poorly
edited answers, incorrect or obsolete ones, incomplete code snippets, too-
specific or too-general answers, misleading information, and other perils
exist among the answers set of posts. Posts on SO, as other software
artifacts, need to change and evolve over time. Edits include fixing code
snippets’ bugs, updating them to work with a more recent version of a library,
or addressing the issue from other perspectives [1, 2]. The numbers confirm
this notion as 13.9M SO posts have been edited after their creation time, 19K
of them more than ten times [2]. To illustrate a case of such need for
attentive maintenance and evolution overtime, we use a SO post as an
example333https://stackoverflow.com/questions/1302605. This post contains a
question that potentially can be improved with new answers. “How do I convert
from Int to Long in Java?” This post has been viewed 581K times and has 13
answers. From this answers set, our SOPI generated answer has obtained 11 up-
votes so far. Although this question has been asked 10 years ago, it is still
active, which indicates the continuous interest in the topic and the need for
better answers. However, programmers are not always motivated to answer or
update CQA websites inherently [3], since it is a time-consuming activity and
needs focus. So we can motivate them either through rewarding mechanisms, or
by simplifying the answering process as much as possible [4]. Although SO has
used various motivating approaches such as awarding badges, studies have shown
these approaches have not been successful enough in the task of improving
overall quality of SO’s posts [5]. Furthermore, Treude and Robillard [6]
studied the quality of code examples on SO and reported less than half of them
have self-explanatory code fragments and therefore require improvement.
Considering that existing code snippets may be faulty, hard to understand, or
have a low quality which is misleading in new user-queries [7], it is
extremely important to correct errors and improve the quality of code
snippets.

Therefore, SO needs a more efficient and easier solution for continuous
improvement and control over the content. We believe this is possible through
exploiting the community itself to fix the existing flaws, improve answers,
update obsolete answers, generalize too-specific answers, address issues from
different views, enrich available code snippets, etc. collectively. Different
studies have addressed this problem from various aspects and tried to propose
solutions for identifying and improving the quality of SO posts [8, 9]. To the
best of our knowledge, while previous work has focused on improving the
process of finding better answers or speeding up the process, none have tried
to identify questions that need better answers and enhance the quality of such
posts. We set the criteria for posts that need improvement as posts that have
no answer or have some sort of an answer, but can have better or extended ones
in terms of quality, level of expertise, details, etc. to satisfy different
programmer’s needs. For instance, while an answer can solve an expert’s
question, it can be very hard for a novice to comprehend. Contrary to that,
some posts have highly-detailed answers, whereas a group of the audience may
prefer a brief answer to solve their problems faster. We call these posts
_“deficient”_.

Our contributions include:

  * •

Addressing a practical problem, i.e., improving the quality of a post’s
answers set using developers’ coding context.

  * •

Training a classification model to automatically identify deficient posts of
SO.

  * •

Developing a tool, SOPI, to facilitate and accelerate the process of answering
and contributing to SO with minimal distraction.

  * •

Three-fold evaluation involving 85 industrial Java developers.

Our study consists of four steps. In step 1, we performed an exploratory
analysis on 3075 questions from SO with the help of 60 developers to
understand the properties of deficient posts. For their For the assessment,
developers considered four measures of answers including completeness,
correctness, conciseness and comprehensibility; then we investigated the
relationship between 11 properties, such as their score, has accepted answers,
and view count of posts with their need for improvement. From these
properties, we chose the most influential features and trained three
classifiers to predict whether a post needs enhancement. We used Neural
Network (NN), Decision Tree (DT), and Support Vector Machine (SVM) models to
classify the posts. According to our evaluation results, J48, a DT classifier,
best predicted these posts with 94.5% precision and 90.3% recall. For step 2,
3, and 4 we developed an Eclipse plugin named _SOPI_ (Stack Overflow Post
Improver). SOPI first finds related questions based on a developer’s
programming context, then it filters them based on the developer’s area of
expertise using the history of selected user in SO as the second stage of
filtration. SOPI then predicts which questions are deficient as the last
filtration and based on the preference of the developer (suggestions
frequency), it prompts the developer to improve the content of selected posts.
To make it even more simple and time-efficient, SOPI recommends a code snippet
according to the programmers’ code and the question’s code snippets [8].
Finally, the new confirmed answer is submitted to SO with minimum
interruption. Therefore, our research questions include:

  * •

RQ1: Can we train a model to predict deficient posts?

  * •

RQ2: Does SOPI facilitate the process of answering SO questions?

  * •

RQ3: Do the posted answers improve the quality of posts?

##  II Properties of Deficient Posts

Here we describe the process of identifying a set of properties for deciding
whether a post needs improvement or not.

###  II-A Data Collection

Using Stack Exchange API444https://api.stackexchange.com/, we randomly
collected data of 3600 posts with the last activity in the time range of 2013
to 2019. These questions have a “Java” tag and are not deleted or closed in
SO. We also retrieved 11 properties that are available for collection using
the SO API to investigate the necessity of enhancement for a post. These
properties are:

  * •

_Has Accepted Answer (HAA):_ Whether the post has an answer that satisfies the
asker?

  * •

_Answer Count (AC):_ The number of answers in a post.

  * •

_Score (S):_ The score of a question based on up-votes and down-votes.

  * •

_Sum of the Answer Scores (SAS):_ The sum of set of answers’ scores based on
their up-votes and down-votes.

  * •

_View Count (VC):_ The view count of a post.

  * •

_The Ratio of Sum of Scores to the View Count (SSVC):_ The sum of answer
scores divided by the view count of a post.

  * •

_Comment Count (CC):_ The number of comments on a question.

  * •

_Favorite Count (FC):_ The number of users who liked the question.

  * •

_Average of Comment Count (ACC):_ The average number of comments on the set of
answers.

  * •

_Average of the Answerer Reputation (AAR):_ The average reputation of
answerers.

  * •

_Asker Reputation (AR):_ The reputation of the asker.

Then, we assigned these posts to 60 experts with a degree in Computer Science
and three months to five years of industrial experience. Furthermore, each
post was covered by at least three participants. That is, each participant
labeled 180 posts. We asked them to check whether these posts require more
appropriate answers, considering the following four criteria which are
utilized in previous studies as well [8]:

  * •

_Completeness:_ Whether the post has at least one answer complete enough to
solve the problem.

  * •

_Conciseness:_ Whether the post has at least one concise answer without non-
informative parts.

  * •

_Correctness:_ Whether all answers to the question are without errors.

  * •

_Comprehensibility:_ Whether the answers are easy to understand.

We first held a three-hour meeting with the participants and established basic
definitions to reach a common ground. Then, we asked the participants to label
a question with the tag “YES” if at least one of the above conditions is not
satisfied (regarding the four criteria). Otherwise, if they think that the
post’s quality measures are fulfilled concerning all four aspects, they should
label it as “NO”. That is if a post needs further improvement, it is
considered deficient in its current state, and subsequently is labeled “YES”.
Otherwise, it is labeled “NO”. To prevent biasing the participants, posts’
information such as their score, has accepted answer, score, etc. is hidden
during the manual labeling. We labeled a post _YES_ , if it had three _YES_
tags which means it is deficient and needs improvement. Similarly, if a
question had three “NO” tags, we set its label to _NO_. It is worth mentioning
we omitted 525 posts after the first round of labeling because we could not
collect three labels for them. In the end, 3075 posts remained. For other
cases (when a post had two “YES” tags and one “NO” tag or had one “YES” tag
and two “NO” tags), we created a five-member group and they discussed each
post together. After the negotiation, all the posts obtained at least four
similar labels, so we labeled them based on the majority of the votes555The
labeled data is available at
https://github.com/MalihehIzadi/SOPI_stackoverflow_answer_quality.

Below, we provide some information about the sample.

  * •

About 66% of posts have an accepted answer.

  * •

A third of posts have at least two answers.

  * •

Half of posts have at least one score.

  * •

SAS for about 70% of posts is between 1 to 8.

  * •

About 75% of posts are viewed between 18 to 2000 times. Also, the maximum view
of the sample count is 159,745.

  * •

The maximum SSVC is around 25%. Also, for around 75% of the posts, the ratio
is less than 1%. Note that some posts have negative values for SSVC since sum
of their scores is negative.

  * •

About 33% of posts do not have any comments. However, 60% of them have between
one to seven comments.

  * •

About 66% of posts do not have any FC.

  * •

About 57% of posts on average have one to 11 comments on their answers.

  * •

The AAR of 50% of posts is between 12K to 32K.

  * •

The AR in only 25% of posts is more than 1K.

###  II-B Comparing the Properties of the Two Groups

To show the difference between the two types of posts, we depicted the
probability density function of the feature associated with each property of
interest, and tried to find out whether they differ considerably. The goal was
to find properties that will help the model find the deficient posts more
accurately. We used Inter-quartile Ranges to remove the outliers. Accordingly,
in each feature, we removed the values below the lower_bound or above the
upper_bound. Figure 1 provides multiple figures for each feature. We show
deficient posts with _dotted Blue_ lines and the rest with _simple Red_ lines.

(a) Has Accepted Answer (HAA)

(b) Answer Count (AC)

(c) Score (S)

(d) Sum of the Answers’ Score (SAS)

(e) View Count (VC)

(f) Sum of the Scores/View Count (SSVC)

(g) Comment Count (CC)

(h) Favorite Count (FC)

(i) Avg of Comment Count (ACC)

(j) Avg of Answerers’ Reputation (AAR)

(k) Asker’s Reputation (AR)

Figure 1: Comparing The properties of the two groups of posts, namely
Deficient (YES) vs Not-Deficient (NO).

###  II-C Qualitative Analysis

We present some insights about deficient posts in this section. As illustrated
in Figure 1(a), when HAA is FALSE, the number of posts requiring improvement
increases. Figure 1(b) shows that the probability of the deficiency would
increase if the post has no answer yet. Although it seems that the Answer
Count is an effective property, this feature does not impact the final label
alone. This is probably because answer’s quality is extremely important. Also
as mentioned before, there can be various solutions to a problem. Therefore,
there are posts that have more than three answers but are labeled as YES. As
shown in Figure 1(c), although the score of a question does not have a close
relationship with the target class (label YES), in lower scores, the
probability of needing improvement is higher than in higher scores. Figure
1(d) depicts the high correlation between SAS and the target class. If we have
a post with a low sum of answer scores, we may have a post that needs
improvement. As presented in Figure 1(e), there are several post that have
been viewed many times, but need better answers. It seems this property is
related to deficiency as well. According to Figure 1(f), another significant
feature related to the target class is the SSVC. If a post has a low value of
this property, probably many users who view the question are not satisfied
with its answers. If a post has a high value for this feature, it is highly
probable that it has appropriate answers with many up-votes. According to
Figure 1(g), the number of comments of a question does not have any obvious
relation with the target class. As we see in Figure 1(h), FC of target posts
are higher than the others. However, this is not a strong relationship because
FC’s value is zero for many posts. According to Figure 1(i), ACC cannot help
our model since the figure is similar for both classes YES and NO. As we see
in Figure 1(j), AAR has higher values in posts that do not need improvement.
However, it does not make a noticeable difference in the figures of the two
classes. Figure 1(k) shows AR does not have any apparent relation with the
target class.

##  III The Prediction Model

In this section we will answer the following research question:

RQ1: Can we train a model to predict deficient posts?

To find deficient posts, we used state-of-the-art classification models with
high performance in this research field. We used feature selection methods to
narrow down the set of related features to the most important ones. A wrapper
method identifies important features. We used three wrapper methods, namely
Recursive Feature Elimination, Genetic Algorithm, and Simulated Annealing with
10-fold cross-validation. We concluded SAS, VC, HAA, SSVC, and AC are the most
important features for our models. Then, we tuned each learning method with
its appropriate features. We use 80% of the data as the training set, and the
rest 20% as the test set666Most of our implementations for creating the models
using _R language_ can be downloaded from
https://github.com/MalihehIzadi/SOPI_stackoverflow_answer_quality.

###  III-A Decision Tree (DT)

To build our predictive model, we used Leave One Out Cross Validation (LOOC)
to tune the Complexity Parameter (CP) of the DT. We tested values between
infinity to 0.005 and concluded the best value for CP is equal to 0.012.

###  III-B Neural Network (NN)

We utilized a neural network with one hidden layer and configured our model
using LOOC. We set the number of hidden units between zero and 100. Through
our experiments, we concluded 66 units in the hidden layer leads to the best
results.

###  III-C Support Vector Machine (SVM)

We used the polynomial kernel and LOOC to find the best values for gamma and
cost. We tested gamma values between $2^{-15}$ to $2^{-1}$ and cost values
between $2^{0}$ to $2^{30}$. Eventually, we set gamma to $2^{-5}$ and cost to
$2^{18}$.

###  III-D Classification Results and Evaluation

After selecting the features and tuning each machine learning method, we ran
our model on the test data. Table I provides the results of each learning
method in percent. DT’s results of 94.5% precision, 90.3% recall, and 92.4% F1
score indicate it performed better than the other two models, thus we used it
in our prediction model777A sample image of this model is accessible at
https://github.com/MalihehIzadi/SOPI_stackoverflow_answer_quality. To answer
RQ1, we conclude our classifier can predict deficient posts with good
performance.

TABLE I: Learning Methods’ Results Learning Model |  Recall Sensitivity | Precision |  Balance Accuracy | Kappa | F1
---|---|---|---|---|---
DT | 90.3% | 94.5% | 94.4% | 90.3% | 92.4%
NN | 88.8% | 92.2% | 93.3% | 87.9% | 90.5%
SVM | 87.3% | 95.1% | 93.0% | 88.7% | 91.0%

###  III-E Feature Selection

Decision Trees show important features when the final tree is generated. We
conclude important features are SSVC, SAS, HAA, and VC, respectively. The
reason is that the DT tries to classify the posts using SSVC at first. Then,
it uses SAS (sumScore) and HAA (accepted) for separating the posts. According
to Sec. II, we expected the ratio of Sum of Answer Scores to the View Count
(SSVC), Sum of Answer Scores (SAS) and Has Accepted Answer (HAA) to be highly
related to predicting our target class.

##  IV SOPI (Stack Overflow Post Improver)

In this section, we explain how SOPI works. After users are logged in, SOPI
tracks their activities in the IDE and suggests related deficient posts in
need of more/better answers based on the developing context. Users can select
their desirable maximum contribution rate (e.g., once a day) in the plugin
setting. This is because we take precautions not to disturb developers or
decrease their productivity while coding by excessive pop-ups or
interruptions. Our goal is to make it simpler for the willing ones to
contribute and share their knowledge at the right time, that is when they are
working on a specific context related to unanswered/poorly answered questions
in SO. It is entirely up to the developers how often (if ever) they will be
prompted by the plugin. It is needless to say in cases that the code should
not be shared or analyzed in any way due to security or licensing issues,
users can turn off the plugin at any moment. Also, contributions take place in
the plugin’s window, not the programming windows. So they are not in the
immediate viewing area of developers and hence the distraction is reduced
further.

SOPI, first, interprets the programming context of the user and then filters
related posts to this context. As a finer-grained filter, it selects questions
from the retrieved set of posts that are related to the user’s expertise as
well. SOPI determines this based on the top tags of this user in SO. Then
using the DT classifier, it predicts which posts need improvement and suggests
them to the developer to improve. It should be mentioned that if SOPI does not
find any post after the mentioned process, it retries after a specified period
which is set in the setting by the programmer. SOPI also provides a draft
answer for the developer to edit. The draft is generated using the code
fragments of the question. In the end, the improved answer is sent to SO
community with minimum interrupts for the developer. We depict this process in
Figure 2. At first, we define each component of our proposed approach, and
then, we integrate those components to form the whole approach.

Figure 2: The SOPI process

###  IV-A Identifying Related Posts

To minimize the context switch for programmers to answer the questions, we try
to find related questions according to the developer’s programming context.
Therefore, we use Prompter, a tool for extracting developer’s coding context
[9]. While the authors use community-related aspects (such as reputation and
scores) in conjunction with code-related aspects, in this step we focus on
coding-context-related aspects such as code similarity, API similarity (types
of the used API), and text similarity (e.g., names of methods invoked in the
API). This is because we intend to minimize the coding context switch as much
as possible. This step helps refine posts based on relevant coding context.

###  IV-B Identifying Programmers’ Expertise

In SO, each user has a few _Top Tags_ according to his previous activities.
When all tags of a question exist in the set of a programmer’s top tags in SO,
he probably can provide good answers for those topics. Therefore, we filter
the posts of the previous step based on the programmers’ top tags. This step
helps refine posts based on relevant expertise as well.

###  IV-C Finding Deficient Posts

We used the DT classifier in this step as described in Sec. III. Here we find
highly-related deficient posts that the programmer can answer with high
quality.

###  IV-D Recommending a Code Snippet

To facilitate the process of answering questions, we use the approach proposed
by Tavakoli et al. [8]. We retrieve the code snippets of a selected question
and look for similar code segments in the programmer’s IDE using clone
detection techniques. To find similar code segments in the programmer’s IDE we
use _simian-2.3.35_ 888http://www.harukizaemon.com/simian/ clone detection
tool. Then, we use the related code parts and create an appropriate code
snippet by adding the relevant code of the programmer using Backward and
Forward Slicing. We believe this will accelerate and simplify the answering
process for our cooperative developer. To apply the slicing technique and find
other relevant parts of the programmer’s program, we exploit the _Wala_
999http://wala.sourceforge.net/ tool. Although a good question should have
code segments according to SO guidelines, if a question does not have any code
segment, we will not recommend any code snippets.

Finally, we integrated all the above parts in our Eclipse plugin, SOPI. Note
that we only use posts that have not had any activities in the recent 90 days.
The reason is that the quality of a question may be improved due to the
activity, but it has not affected the data about the post. Also, we assign the
posts to the programmer based on the score calculated using Prompter’s
approach. That is if a selected post has 60% similarity with the programmer’s
programming context, it will be assigned to her/him with a probability of 60%.
On the other hand, with a probability of 40%, the plugin similarly tries to
assign another post to the user. This assignment process would continue until
a post is assigned to the programmer. Although our goal is to improve the
posts using the help of the community and facilitating this process, we also
try not to disturb the developers more than needed. If a programmer prefers to
contribute to SO daily, the plugin suggests a deficient post once a day, no
more. Finally, the plugin recommends a code snippet that the user can edit or
add an explanation to, then SOPI submits the answer to SO.

###  IV-E An Example of Utilizing SOPI

Remember the post mentioned in Sec. I. Assume a developer with expertise in
Google APIs is doing his daily programming tasks. SOPI detects this post as a
related deficient post and assigns this to the user. Then it recommends a code
snippet from the developer’s IDE using clone detection and slicing techniques.
Finally, after a few edits by the developer, the code snippet shown in Figure
3 is posted to SO as a new answer to the question.

⬇

final HttpTransport transport = new NetHttpTransport();

final JsonFactory jsonFactory = new JacksonFactory();

GoogleIdTokenVerifier verifier = new GoogleIdTokenVerifier.Builder(transport,
jsonFactory)

.setAudience(Arrays.asList(clientId))

.setIssuer("https://accounts.google.com")

.build();

GoogleIdToken idToken = null;

try {

idToken = verifier.verify(ID_TOKEN);

} catch (GeneralSecurityException e) {

e.printStackTrace();

} catch (IOException e) {

e.printStackTrace();

}

GoogleIdToken.Payload payload = null;

if (idToken != null) {

payload = idToken.getPayload();

}

String firstName = payload.get("given_name").toString();

String lastName = payload.get("family_name").toString();

Figure 3: A code snippet created by the SOPI

##  V Evaluations

We evaluated our approach in two phases. First, we evaluated SOPI’s
helpfulness for the users while contributing to SO. Then, we evaluated the
effect of our approach on the qualities of posts in SO in terms of
completeness, conciseness, correctness and comprehensibility as four metrics
on the quality of a set of answers.

###  V-A Evaluating the Usefulness of SOPI

We first address the usefulness of SOPI for developers who contribute to SO
while working on their code in the IDE. The goal of this experiment is to
answer the following research question:

RQ2: “Does SOPI facilitate the process of answering SO questions?”

We asked 10 programmers with at least four years of Java programming industry
experience to use the SOPI for three weeks, while they were doing their daily
tasks. The participants had four different role levels, namely _chief
technical officer_ (1 participant), _technical project lead_ (2 participants),
_senior software developer_ (2 participants), and _software developer_ (5
participants). In the period of using SOPI, the programmers were developing a
Back-end as a Service (Baas) platform such as object storage, cloud code,
authentication, etc. Therefore, they faced several programming tasks such as
string operations, database operations, and RESTful APIs. This strengthened
our evaluation because the participants performed various programming tasks
that could cover different topics of questions on SO. Detailed information
about the participants in this experiment is available in our repository
101010We reported the number of years of programming experience for each
participant in the last three columns.
https://github.com/MalihehIzadi/SOPI_stackoverflow_answer_quality.

We assigned deficient posts to the participants every three days and asked
them to answer at least two questions. We also designed a questionnaire and
asked the participants about the similarity of assigned posts with their
programming context and expertise. Moreover, we asked them whether these posts
needed improvement. If yes, according to which criteria this improvement
should take place. Finally, we asked them about the usefulness of recommended
code snippet. Table II presents the results of this experiment111111Detailed
information can be found at
https://github.com/MalihehIzadi/SOPI_stackoverflow_answer_quality. We report
the number of average assigned posts to participants in column _Assigned
Count_ , average number of posts related to _programmer’s developing context_
in column _Related Context_ and average number of posts related to each
_programmer’s field of expertise_ among all the assigned posts in column
_Related Expertise_. The Deficient Count column shows average number of
deficient posts and the next four columns report average number of deficient
posts regarding our four metrics from all participant’s view. Finally, the
last two columns report average number of cases that our plugin recommended
code snippets and how many of them were useful for the participant.

For instance, SOPI on average assigned 5.4 posts to each programmer from which
on average 4.5 of them were related to their coding-context and so on.

TABLE II: Results of the SOPI Evaluation Participant |  Assigned Count |  Related Context |  Related Expertise |  Deficient Count |  Completeness |  Conciseness |  Correctness |  Comprehensibility |  Recommended Count |  Useful Recommendations
---|---|---|---|---|---|---|---|---|---|---
Avg | 5.4 |  4.5 |  5.1 |  4.4 |  2.4 |  1.0 |  0.6 |  1.4 |  3.8 |  3.1

The Experiment’s Results: SOPI assigned 94% and 83% of the posts correctly
regarding relatedness to developers’ expertise and programming context,
respectively. About 81% of posts assigned by the plugin (classified by the DT
model in the previous step) were determined deficient by the participants of
this experiment as well. In about 70% of cases, SOPI suggested code snippets
for the participants, from which 82% facilitated the process of answering.
According to the results, it seems that utilizing code aspects used in
Prompter [9] can help assign appropriate posts to programmers. SOPI was also
successful in assigning questions to the programmers who have enough
experience for answering them. This indicates that using the history of a
user’s activities and question’s tags are indeed effective. However, in some
cases, participants were unable to answer the assigned questions. In further
investigations, we concluded that one reason for this problem is indeed
inappropriate question’s tags which misled the SOPI. SOPI was also successful
in recommending code snippets to help programmers contribute to SO easier and
faster. Therefore, using the ExRec method [8] can help produce good code
snippets for the programmers. Note that we use the method only for questions
and thus, some problems of the existing code in SO’s answers, such as errors
and low comprehensibility, are not included in our recommendation. To answer
RQ2, we can conclude SOPI is indeed successful in recommending relevant posts
to users and at the same time provide them with good initial answers (code
snippets) to facilitate answering process.

Furthermore, we analyzed how this set of participants perceived low-quality
posts in terms of the four criteria we used to label deficient posts as well.
Participants believed that more than half of posts (about 54%) need more
complete set of answers. This issue can be caused by various reasons. For
instance, users tend to answer fast, maybe just to collect reputation. So they
may become hasty and not address all aspects of a question being asked. This
also can make answers hard to understand, as participants claimed one-third of
the posts have comprehensibility problems in their answers. Therefore, it is
better that SO users take more time to comprehend the question thoroughly, and
then add some details to their answers to explain their replies more clearly.
About 23% of posts were reported to contain useless information in their
answers set. This issue can occur when the answerers copy and paste all parts
of their methods including unhelpful segments. Participants claimed 14% of
answers were incorrect. This is probably due to the fact that answerers
usually do not test their code snippets before posting them on SO and they may
have syntactic or semantic errors. Furthermore, some of the posts needed to be
improved from various aspects at the same time. For example, an answer can be
enhanced regarding completeness and comprehensibility areas. Therefore we
suggest that SO changes some of its policies on how it rewards users for
answering questions in a way that users try to provide more comprehensive,
understandable, correct and concise answers rather than just answering faster
than others.

Moreover, participants were asked to determine which aspects of the post they
want to improve. Table III reports these findings. For instance, programmer
$P_{1}$ submitted answers to three of the four deficient posts to improve
completeness in two, conciseness in one, and correctness in one of the posts.

TABLE III: Improvement Type based on the Metrics Participant |  Deficient Count |  Submit Count |  Completeness |  Conciseness |  Correctness |  Comprehensibility
---|---|---|---|---|---|---
$P_{1}$ | 4 | 3 | 2 | 1 | 1 | 0
$P_{2}$ | 3 | 3 | 2 | 0 | 1 | 1
$P_{3}$ | 6 | 3 | 2 | 1 | 0 | 1
$P_{4}$ | 5 | 2 | 1 | 0 | 1 | 1
$P_{5}$ | 4 | 2 | 2 | 0 | 0 | 1
$P_{6}$ | 5 | 3 | 2 | 1 | 0 | 1
$P_{7}$ | 4 | 2 | 1 | 0 | 0 | 1
$P_{8}$ | 6 | 4 | 3 | 1 | 1 | 0
$P_{9}$ | 6 | 3 | 2 | 1 | 0 | 1
$P_{10}$ | 6 | 2 | 2 | 1 | 0 | 0

###  V-B Evaluating the Effects of SOPI in Stack Overflow

This experiment was designed to answer the following research question:

RQ3: “Do the posted answers improve the quality of questions?”.

To find the answer to the above research question, we utilized 26 answers that
had been created using our plugin in the previous experiment121212The links to
the answers which have been sent to SO by SOPI during our evaluation will be
added for the camera-ready version.. Next, we asked 15 other programmers with
at least two years of Java programming language experience in the industry to
qualify the answers. We randomly assigned about 12 answers to each programmer
in a way that each answer was validated at least seven times. Detailed
information about the participants in this experiment is available in our
repository
131313https://github.com/MalihehIzadi/SOPI_stackoverflow_answer_quality.

First, we asked the participants whether the posts needed improvement and
concerning what metric. Then, we asked them to investigate the effect of the
new answers based on the four metrics. Table IV reports the result of this
experiment141414Access detailed information from our repository. On average,
programmers claim 11.8 posts were deficient and the deficiency of 10.9 of them
was resolved by utilizing the answers generated with the help of SOPI.

The Experiment’s Results: According to our user study, about 50% of the
problems lied with the completeness of answers’ set, 19% with conciseness, 13%
with correctness, and 22% with comprehensibility. Therefore, to answer RQ3,
SOPI improved the perceived quality of 92% of the deficient posts on average.

TABLE IV: Results of the Proposed Approach Evaluation Participant |  Deficient Count |  Solved Count |  Completeness |  Conciseness |  Correctness |  Comprehensibility
---|---|---|---|---|---|---
Avg |  11.8 |  10.9 (92%) |  5.9 (50%) |  2.3 (19%) |  1.6 (13%) |  2.6 (22%)

##  VI Threats to Validity

In this section, we discuss potential threats to the validity of our approach
and results in four categories of Internal, External, Construct and
Reproducibility threats as follows.

###  VI-A Internal Validity

The main threat to our internal validity is the set of posts collected from SO
which affected the learning model. We tried to mitigate this threat through a
random selection of a large number of posts in a prolonged time interval
(2013-2019). We also covered various areas of programming in Java. Moreover,
85 participants were engaged in the assessment of our model. Logically, the
characteristics of these individuals can affect the outcome of our evaluation.
To reduce this threat, we tried to get help from a large number of programmers
with various skills and different experience levels.

###  VI-B External Validity

Selecting questions of one program language (Java) to train a model can limit
the expandability of our tool. However, Java is one of the main programming
languages which is widely used in practice. Furthermore, our proposed approach
can be adapted for other programming languages using the variety of questions
and answers in these languages available on SO or similar CQA platforms. Also,
there are various code analyzing techniques for other languages (e.g., clone
detection, and forward and backward slicing) and one can find related posts
and recommend useful code snippets to programmers in a similar process.

###  VI-C Construct Validity

The main threat to our construct validity is the labeling process of posts. We
addressed this threat by assigning each post to three experts and choosing the
final label based on the three generated labels. Also, in cases that
programmers did not agree with each other, we held meetings with groups
including three participants and two other programmers to reach a consensus
agreement. The group would discuss the post and choose an appropriate label
altogether.

Note that the decision of labeling a set of answers as being deficient
inherently depends on people’s subjective opinions. Therefore, we
intentionally used our qualitative metrics (completeness, conciseness,
correctness, comprehensibility) that are subjective to some extent and can
vary from one person to another. However, we clearly defined each one and
communicated the definitions to the participants in face-to-face meetings to
obtain more or less consistent evaluations. We also used a large number of
participants with diverse backgrounds and expertise to represent a wide range
of users on SO to mitigate this threat. We also used 85 different programmers
in three different levels of evaluation to mitigate these threats.

###  VI-D Reproducibility

We have shared our data set along with our source code on-line for replication
by other researchers.

##  VII Related Work

In this section, we review previous work on improvement of posts in CQA
websites, specifically in SO. We categorize previous studies in three groups
of (1) facilitating the use of SO; (2) investigating properties of SO elements
such as questions, answers, and users; and (3) improving the efficiency in the
processes of SO.

###  VII-A Facilitating the use of SO

Researchers have tried to help programmers use SO more easily. For example,
they would develop a plugin which helps programmers browse useful and related
SO posts, without the need to exit their IDEs and switch between platforms.
Most of these approaches use developers’ programming context and properties of
posts (e.g., score, the reputation of an answerer, etc.) to recommend better
pages to users [9].

###  VII-B Investigating properties of SO elements

Several studies try to identify important properties of SO pages, users, etc.
Others search for features of unusual questions such as unanswered, closed and
deleted questions with the goal to model and predict such questions [10, 11].
Some researches try to find high-quality questions, answers and code snippets
posted on SO to help users find high-quality elements efficiently [12, 13,
14]. Moreover, they model such behaviors and help programmers produce high-
quality posts [15, 16]. Finally, some studies have focused on modeling expert
finding and routing questions to appropriate answerers [17].

###  VII-C Improving efficiency in the processes of SO

The last group tries to automate the quality assessment of posts and provide
solutions on how to prevent low-quality posts from being published on CQA
platforms. They use content-related properties of posts such as having code
snippets, readability, and their community-related properties (e.g.
reputation) to predict posts that need more review and edit before being
published. The goal is to help administrators validate the tremendous number
of posts more effectively [18]. Several studies also focused on investigating
effects of different policies (such as badge policies) on the quality of posts
[19, 5].

In recent years, several approaches were introduced to help programmers find
related questions and hints from SO such as Prompter[9]. However, none of them
have tried to both facilitate the process and improve the quality of the posts
which are done by SOPI. Note that our proposed model does not necessarily
compete with the previous methods. In fact, SOPI can complement their
functionality.

##  VIII Conclusions and Future Work

In recent years, SO has played an important role in solving programmers’
challenges. Although highly popular, SO has not been exploited to its highest
potential by its community due to several obstacles. The existence of a large
number of posts with low-quality answers has been recognized as one of the
main shortcomings of SO in this research field. These posts are either without
any accepted answered or their existing answers are incomplete or incorrect.
Therefore a well-organized, collective and continuous effort should be
allocated to identification and improvement of these posts. However due to
time-limitations, deadline pressures and lack of incentive, programmers tend
to neglect to answer these types of posts. To mitigate this issue, we
introduced SOPI, an Eclipse plugin, that finds relevant posts based on
developers’ programming context and expertise. Then, it selects a post in SO
which requires improvement. To identify such deficient posts, we trained a
model using the Decision Tree approach on 3075 questions with a balanced
accuracy of 94.4%. Finally, SOPI recommends a code snippet to facilitate the
process of generating answers for programmers and submits the new post to SO.

We evaluated our approach in two phases and confirmed its efficiency in both
facilitating the process of answering questions and improving the quality of
answers in SO. It also reduces the allocated time and effort needed to do so
through automating this process.

In the future, we plan to improve our model by using the content of posts. For
example, the topic of a post can affect the way it is answered. That is, some
topics are more specific and few users can answer them, while others are
easier and more general, thus will be answered faster. We also intend to
extend the functionality of SOPI in finding highly skilled experts to assign
questions to the best programmers. In particular, we will integrate more
community aspects of programmers’ profiles in our model as well.

## References

  * [1] H. Zhang, S. Wang, T.-H. P. Chen, Y. Zou, and A. E. Hassan, “An empirical study of obsolete answers on Stack Overflow,” _IEEE Transactions on Software Engineering_ , 2019.
  * [2] S. Baltes, L. Dumani, C. Treude, and S. Diehl, “The evolution of Stack Overflow posts: Reconstruction and analysis,” _arXiv preprint arXiv:1811.00804_ , 2018.
  * [3] C. Treude, O. Barzilay, and M.-A. Storey, “How do programmers ask and answer questions on the web?” in _Proceedings of the 33rd International Conference on Software Engineering_. IEEE, 2011, pp. 804–807.
  * [4] Z. Liu and B. J. Jansen, “Identifying and predicting the desire to help in social question and answering,” _Information Processing & Management_, vol. 53, no. 2, pp. 490–504, 2017.
  * [5] S. Wang, T.-H. P. Chen, and A. E. Hassan, “How do users revise answers on technical Q&A websites? a case study on Stack Overflow,” _IEEE Transactions on Software Engineering_ , 2018, Avaiable Online at https://ieeexplore.ieee.org/abstract/document/8485395.
  * [6] C. Treude and M. P. Robillard, “Understanding Stack Overflow code fragments,” in _Proceedings of the 2017 International Conference on Software Maintenance and Evolution_. IEEE, 2017, pp. 509–513.
  * [7] D. Ford, K. Lustig, J. Banks, and C. Parnin, “We don’t do that here: How collaborative editing with mentors improves engagement in social Q&A communities,” in _Proceedings of the 2018 CHI Conference on Human Factors in Computing Systems_. ACM, 2018, p. 608.
  * [8] M. Tavakoli, A. Heydarnoori, and M. Ghafari, “Improving the quality of code snippets in Stack Overflow,” in _Proceedings of the 31st Annual ACM Symposium on Applied Computing_. ACM, 2016, pp. 1492–1497.
  * [9] L. Ponzanelli, G. Bavota, M. Di Penta, R. Oliveto, and M. Lanza, “Prompter: A self-confident recommender system,” in _Proceedings of the IEEE International Conference on Software Maintenance and Evolution_. IEEE, 2014, pp. 577–580.
  * [10] M. Asaduzzaman, A. S. Mashiyat, C. K. Roy, and K. A. Schneider, “Answering questions about unanswered questions of Stack Overflow,” in _Proceedings of the 10th Working Conference on Mining Software Repositories_. IEEE Press, 2013, pp. 97–100.
  * [11] D. Correa and A. Sureka, “Chaff from the wheat: Characterization and modeling of deleted questions on Stack Overflow,” in _Proceedings of the 23rd international conference on World wide web_. ACM, 2014, pp. 631–642.
  * [12] D. Yang, A. Hussain, and C. V. Lopes, “From query to usable code: an analysis of stack overflow code snippets,” in _2016 IEEE/ACM 13th Working Conference on Mining Software Repositories (MSR)_. IEEE, 2016, pp. 391–401.
  * [13] Z. Yao, D. S. Weld, W.-P. Chen, and H. Sun, “Staqc: A systematically mined question-code dataset from stack overflow,” in _Proceedings of the 2018 World Wide Web Conference_ , 2018, pp. 1693–1703.
  * [14] P. Yin, B. Deng, E. Chen, B. Vasilescu, and G. Neubig, “Learning to mine aligned code and natural language pairs from stack overflow,” in _2018 IEEE/ACM 15th International Conference on Mining Software Repositories (MSR)_. IEEE, 2018, pp. 476–486.
  * [15] L. Nie, X. Wei, D. Zhang, X. Wang, Z. Gao, and Y. Yang, “Data-driven answer selection in community qa systems.” _IEEE Trans. Knowl. Data Eng._ , vol. 29, no. 6, pp. 1186–1198, 2017.
  * [16] F. Calefato, F. Lanubile, and N. Novielli, “How to ask for technical help? evidence-based guidelines for writing questions on Stack Overflow,” _Information and Software Technology_ , vol. 94, pp. 186–207, 2018.
  * [17] M. Neshati, “On early detection of high voted Q&A on Stack Overflow,” _Information Processing & Management_, vol. 53, no. 4, pp. 780–798, 2017\.
  * [18] L. Ponzanelli, A. Mocci, A. Bacchelli, and M. Lanza, “Understanding and classifying the quality of technical forum questions,” in _Proceedings of the 14th International Conference on Quality Software_. IEEE, 2014, pp. 343–352.
  * [19] C. Chen, X. Chen, J. Sun, Z. Xing, and G. Li, “Data-driven proactive policy assurance of post quality in community Q&A sites,” _Proceedings of the ACM on human-computer interaction_ , vol. 2, no. CSCW, p. 33, 2018.