sharding-core/src/main/java/org/apache/shardingsphere/core/executor/sql/execute/result/AggregationDistinctQueryResult.java

Avoid autogenerated methods to access private fields and methods of inner / outer classes
79
return new AggregationDistinctQueryResult(getColumnLabelAndIndexMap(), resultData.iterator(), metaData);

sharding-core/src/main/java/org/apache/shardingsphere/core/parsing/antlr/extractor/impl/PredicateExtractor.java

Avoid unused method parameters such as 'placeholderIndexes'.
92
private OrConditionSegment mergeCondition(final Map<ParserRuleContext, Integer> placeholderIndexes, final OrConditionSegment leftOrCondition,

sharding-core/src/main/java/org/apache/shardingsphere/core/parsing/lexer/analyzer/Tokenizer.java

Avoid variables with short names like ch
94
private boolean isMultipleLineCommentBegin(final char ch, final char next) {

sharding-core/src/main/java/org/apache/shardingsphere/core/parsing/lexer/dialect/h2/H2Lexer.java

Avoid variables with short names like ch
39
protected boolean isIdentifierBegin(final char ch) {

sharding-core/src/main/java/org/apache/shardingsphere/core/parsing/parser/clause/InsertSetClauseParser.java

Abstract classes should be named AbstractXXX
54
public abstract class InsertSetClauseParser implements SQLClauseParser {

sharding-core/src/test/java/org/apache/shardingsphere/core/metadata/datasource/dialect/SQLServerDataSourceMetaDataTest.java

Do not hard code the IP address
38
assertThat(actual.getHostName(), is("127.0.0.1"));

sharding-core/src/test/java/org/apache/shardingsphere/core/parsing/integrate/asserts/AntlrParserResultSetLoader.java

All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning.
25
public final class AntlrParserResultSetLoader extends ParserResultSetLoader {

sharding-core/src/test/java/org/apache/shardingsphere/core/parsing/lexer/analyzer/TokenizerTest.java

String.indexOf(char) is faster than String.indexOf(String).
71
Tokenizer tokenizer = new Tokenizer(sql, dictionary, sql.indexOf("#"));
String.indexOf(char) is faster than String.indexOf(String).
98
int expected = sql.indexOf("/") + comment.length();
String.indexOf(char) is faster than String.indexOf(String).
165
tokenizer = new Tokenizer(sql, dictionary, sql.indexOf("`"));
String.indexOf(char) is faster than String.indexOf(String).
184
Tokenizer tokenizer = new Tokenizer(sql, dictionary, sql.indexOf("`"));

sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/adapter/WrapperAdapter.java

Abstract classes should be named AbstractXXX
33
public abstract class WrapperAdapter implements Wrapper {

sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/unsupported/AbstractUnsupportedOperationPreparedStatement.java

Avoid variables with short names like x
61
public final void setNClob(final int parameterIndex, final NClob x) throws SQLException {
Avoid variables with short names like x
86
public final void setArray(final int parameterIndex, final Array x) throws SQLException {

sharding-jdbc/sharding-jdbc-core/src/test/java/org/apache/shardingsphere/dbtest/engine/BatchIntegrateTest.java

Assigning an Object to null is a code smell. Consider refactoring.
86
dataSetEnvironmentManager = databaseTypeEnvironment.isEnabled() ? new DataSetEnvironmentManager(EnvironmentPath.getDataInitializeResourceFile(shardingRuleType), getDataSourceMap()) : null;

sharding-jdbc/sharding-jdbc-core/src/test/java/org/apache/shardingsphere/dbtest/engine/dql/BaseDQLIntegrateTest.java

Abstract classes should be named AbstractXXX
58
public abstract class BaseDQLIntegrateTest extends SingleIntegrateTest {

sharding-jdbc/sharding-jdbc-core/src/test/java/org/apache/shardingsphere/dbtest/env/IntegrateTestEnvironment.java

Do not hard code the IP address
78
databaseEnvironments.put(each, new DatabaseEnvironment(each, prop.getProperty("sqlserver.host", "127.0.0.1"), Integer.parseInt(prop.getProperty("sqlserver.port", "1433")),
Do not hard code the IP address
82
databaseEnvironments.put(each, new DatabaseEnvironment(each, prop.getProperty("oracle.host", "127.0.0.1"), Integer.parseInt(prop.getProperty("oracle.port", "1521")),

sharding-jdbc/sharding-jdbc-core/src/test/java/org/apache/shardingsphere/shardingjdbc/executor/StatementExecutorTest.java

JUnit 4 tests that set up tests should use the @Before annotation
61
@Override

sharding-jdbc/sharding-jdbc-core/src/test/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/resultset/ShardingResultSetTest.java

Dont create instances of already existing BigInteger and BigDecimal (ZERO, ONE, TEN)
233
when(mergeResultSet.getValue("label", BigDecimal.class)).thenReturn(new BigDecimal("1"));