question: private static String fixImportStatement ( String importStatementOnDemand ) { if ( importStatementOnDemand . endsWith ( ".*" ) ) { return importStatementOnDemand . substring ( 0 , importStatementOnDemand . length ( ) - 2 ) ; } else { boolean hasClassname = StringUtil . hasUpperCaseChar ( importStatementOnDemand ) ; if ( hasClassname ) { int pos = importStatementOnDemand . lastIndexOf ( "." ) ; return importStatementOnDemand . substring ( 0 , pos ) ; } else { return importStatementOnDemand ; } } }
target:  Fixes the import statement to be returned as packagename only (without .* or any Classname). <p/> <br/>Example: java.util will be returned as java.util <br/>Example: java.util.* will be returned as java.util <br/>Example: java.text.SimpleDateFormat will be returned as java.text