---------------------------------------------------------------------------
Bug #1
Description of the bug:The variable is written by mistake.
Lines of source code that contain the bug:
else if (nucleotide == 'G') {
numberOfC++;
}
Lines of the fixed code:
else if (nucleotide == 'G') {
numberOfG++;
}
---------------------------------------------------------------------------
Bug #2
Description of the bug:The requirement of while-circulation is written by mistake.
Lines of source code that contain the bug:
while (index < sequence.length()-1)
Lines of the fixed code:
while (index < sequence.length())
---------------------------------------------------------------------------
Bug #3
Description of the bug:The attributes numberOfA,numberOfT,numberOfC,numberOfG is redefined as local varibles by mistake.
Lines of source code that contain the bug:
private int numberOfA;
private int numberOfT;
private int numberOfC;
private int numberOfG;
int numberOfA = 0;
int numberOfT = 0;
int numberOfC = 0;
int numberOfG = 0;
Lines of the fixed code:
private int numberOfA;
private int numberOfT;
private int numberOfC;
private int numberOfG;
---------------------------------------------------------------------------
Bug #4
Description of the bug:The the requirement of if statement should be connected by "&&" symbol.
Lines of source code that contain the bug:
if ((firstNucleotide == input) || (secondNucleotide == input))
Lines of the fixed code:
if ((firstNucleotide == input) || (secondNucleotide == input))
---------------------------------------------------------------------------