SmartyStreets does a good job cleaning up and standardizing street addresses, although it can only fix it if it is an otherwise valid address. You can try out the demo for free here.
As far as incomplete addresses, There does need to be enough to tell what the address is supposed to be. For example, 1234 South Oak
is not enough to go off of. You need either the city and state, or the ZIP Code.
The address 1600 amphetheater parkway, mountain view, california
would come out as
1600 Amphitheatre Pkwy
Mountain View CA 94043-1351
The misspelling of Amphitheatre
has been corrected, the ZIP code has been added, and everything now follows the USPS standard format (including proper abbreviations).
SmartyStreets has many SDKs (including a Java one) to make integration into your code easier. The SDKs are open source and use the Apache 2 license, so you can feel free to use them in any app, even commercial ones.
You can start with a free subscription of 250 lookups per month to try SmartyStreets out, and if you need more than that, larger paid subscriptions are available.
(Full disclosure: I am a software developer for SmartyStreets, and I built the Java SDK)