An easy way would just be to add a leading 0 to the parts string. For example:
if(parts[12].length == 3)
parts[12] = "0"+parts[12];
If you're trying to read military time as opposed to the 12 hour system, you need to modify your pattern to "HHmm". "HH" means 24 hour, "hh" means 12 hour. You'll find a full list in the Oracle documentation.