fix nullpointer bug
import static code analysis tools