repo stringlengths 1 191 ⌀ | file stringlengths 23 351 | code stringlengths 0 5.32M | file_length int64 0 5.32M | avg_line_length float64 0 2.9k | max_line_length int64 0 288k | extension_type stringclasses 1
value |
|---|---|---|---|---|---|---|
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/codestyle/unnecessaryimport/package1/U.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.codestyle.unnecessaryimport.package1;
import net.sourceforge.pmd.lang.java.rule.codestyle.unnecessaryimport.package2.*; // SUPPRESS CHECKSTYLE needed for test case
public class U {
pr... | 369 | 25.428571 | 125 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/codestyle/unnecessaryimport/package2/C.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.codestyle.unnecessaryimport.package2;
public class C {
private C() { }
public class IC { }
public static class ISC { }
public static final String V = "";
}
| 307 | 18.25 | 80 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/ExcessivePublicCountTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class ExcessivePublicCountTest extends PmdRuleTst {
// no additional unit tests
}
| 281 | 22.5 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/ExcessiveParameterListTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class ExcessiveParameterListTest extends PmdRuleTst {
// no additional unit tests
}
| 283 | 22.666667 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/CognitiveComplexityTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class CognitiveComplexityTest extends PmdRuleTst {
// no additional unit tests
}
| 280 | 22.416667 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/SimplifyBooleanExpressionsTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class SimplifyBooleanExpressionsTest extends PmdRuleTst {
// no additional unit tests
}
| 287 | 23 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/ExceptionAsFlowControlTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class ExceptionAsFlowControlTest extends PmdRuleTst {
// no additional unit tests
}
| 283 | 22.666667 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/NPathComplexityTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class NPathComplexityTest extends PmdRuleTst {
// no additional unit tests
}
| 276 | 22.083333 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/AvoidCatchingGenericExceptionTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class AvoidCatchingGenericExceptionTest extends PmdRuleTst {
// no additional unit tests
}
| 290 | 23.25 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/AvoidDeeplyNestedIfStmtsTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class AvoidDeeplyNestedIfStmtsTest extends PmdRuleTst {
// no additional unit tests
}
| 285 | 22.833333 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/TooManyMethodsTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class TooManyMethodsTest extends PmdRuleTst {
// no additional unit tests
}
| 275 | 22 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/DataClassTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class DataClassTest extends PmdRuleTst {
// no additional unit tests
}
| 270 | 21.583333 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/InvalidJavaBeanTest.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
public class InvalidJavaBeanTest extends PmdRuleTst {
// no additional unit tests
}
| 282 | 22.583333 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/CyclomaticComplexityTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class CyclomaticComplexityTest extends PmdRuleTst {
// no additional unit tests
}
| 281 | 22.5 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/FinalFieldCouldBeStaticTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class FinalFieldCouldBeStaticTest extends PmdRuleTst {
// no additional unit tests
}
| 284 | 22.75 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/LawOfDemeterTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class LawOfDemeterTest extends PmdRuleTst {
// no additional unit tests
}
| 273 | 21.833333 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/AvoidThrowingRawExceptionTypesTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class AvoidThrowingRawExceptionTypesTest extends PmdRuleTst {
public static class Throwable extends java.lang.Throwable {... | 847 | 31.615385 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/SimplifyBooleanReturnsTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class SimplifyBooleanReturnsTest extends PmdRuleTst {
// no additional unit tests
}
| 283 | 22.666667 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/AvoidThrowingNewInstanceOfSameExceptionTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class AvoidThrowingNewInstanceOfSameExceptionTest extends PmdRuleTst {
// no additional unit tests
}
| 300 | 24.083333 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/AvoidUncheckedExceptionsInSignaturesTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class AvoidUncheckedExceptionsInSignaturesTest extends PmdRuleTst {
// no additional unit tests
}
| 297 | 23.833333 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/ImmutableFieldTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class ImmutableFieldTest extends PmdRuleTst {
// no additional unit tests
}
| 275 | 22 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/AbstractClassWithoutAnyMethodTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class AbstractClassWithoutAnyMethodTest extends PmdRuleTst {
// no additional unit tests
}
| 290 | 23.25 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/AvoidRethrowingExceptionTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class AvoidRethrowingExceptionTest extends PmdRuleTst {
// no additional unit tests
}
| 285 | 22.833333 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/ExcessiveImportsTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class ExcessiveImportsTest extends PmdRuleTst {
// no additional unit tests
}
| 277 | 22.166667 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/UseObjectForClearerAPITest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class UseObjectForClearerAPITest extends PmdRuleTst {
// no additional unit tests
}
| 283 | 22.666667 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/SignatureDeclareThrowsExceptionTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class SignatureDeclareThrowsExceptionTest extends PmdRuleTst {
// no additional unit tests
}
| 292 | 23.416667 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/DoNotExtendJavaLangErrorTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class DoNotExtendJavaLangErrorTest extends PmdRuleTst {
// no additional unit tests
}
| 285 | 22.833333 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/SimplifiedTernaryTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class SimplifiedTernaryTest extends PmdRuleTst {
// no additional unit tests
}
| 278 | 22.25 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/CouplingBetweenObjectsTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class CouplingBetweenObjectsTest extends PmdRuleTst {
// no additional unit tests
}
| 283 | 22.666667 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/NcssCountTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class NcssCountTest extends PmdRuleTst {
// no additional unit tests
}
| 270 | 21.583333 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/LogicInversionTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class LogicInversionTest extends PmdRuleTst {
// no additional unit tests
}
| 275 | 22 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/AvoidThrowingNullPointerExceptionTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class AvoidThrowingNullPointerExceptionTest extends PmdRuleTst {
// no additional unit tests
}
| 294 | 23.583333 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/GodClassTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class GodClassTest extends PmdRuleTst {
// no additional unit tests
}
| 269 | 21.5 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/LoosePackageCouplingTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class LoosePackageCouplingTest extends PmdRuleTst {
// no additional unit tests
}
| 281 | 22.5 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/SwitchDensityTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class SwitchDensityTest extends PmdRuleTst {
// no additional unit tests
}
| 274 | 21.916667 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/SimplifyConditionalTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class SimplifyConditionalTest extends PmdRuleTst {
// no additional unit tests
}
| 280 | 22.416667 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/SingularFieldTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class SingularFieldTest extends PmdRuleTst {
// no additional unit tests
}
| 274 | 21.916667 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/MutableStaticStateTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class MutableStaticStateTest extends PmdRuleTst {
// no additional unit tests
}
| 279 | 22.333333 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/ClassWithOnlyPrivateConstructorsShouldBeFinalTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class ClassWithOnlyPrivateConstructorsShouldBeFinalTest extends PmdRuleTst {
// no additional unit tests
}
| 306 | 24.583333 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/UseUtilityClassTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class UseUtilityClassTest extends PmdRuleTst {
// no additional unit tests
}
| 276 | 22.083333 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/ExcessiveMethodLengthTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class ExcessiveMethodLengthTest extends PmdRuleTst {
// no additional unit tests
}
| 282 | 22.583333 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/UselessOverridingMethodTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class UselessOverridingMethodTest extends PmdRuleTst {
// no additional unit tests
}
| 284 | 22.75 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/TooManyFieldsTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class TooManyFieldsTest extends PmdRuleTst {
// no additional unit tests
}
| 274 | 21.916667 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/ExcessiveClassLengthTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class ExcessiveClassLengthTest extends PmdRuleTst {
// no additional unit tests
}
| 281 | 22.5 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/CollapsibleIfStatementsTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import net.sourceforge.pmd.testframework.PmdRuleTst;
class CollapsibleIfStatementsTest extends PmdRuleTst {
// no additional unit tests
}
| 284 | 22.75 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/signaturedeclarethrowsexception/MyTestCase.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design.signaturedeclarethrowsexception;
import org.junit.Ignore;
import junit.framework.TestCase;
/**
* Warning, this class IS NOT useless. It is used by the some regression tests.
*
... | 446 | 21.35 | 82 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/uselessoverridingmethod/BaseClass.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design.uselessoverridingmethod;
public class BaseClass {
protected void doBase() {
}
protected void doBaseWithArg(String foo) {
}
protected void doBaseWithArgs(Strin... | 412 | 18.666667 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/uselessoverridingmethod/OtherSubclass.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design.uselessoverridingmethod;
public class OtherSubclass extends BaseClass {
// note: argument type overloaded from CharSequence to String
protected void methodWithInterface(Str... | 379 | 26.142857 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/uselessoverridingmethod/DirectSynchronizingSubclass.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design.uselessoverridingmethod;
public class DirectSynchronizingSubclass extends BaseClass {
@Override
protected synchronized void doBase() {
// overriding for synchronize... | 354 | 22.666667 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/uselessoverridingmethod/DirectSubclass.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design.uselessoverridingmethod;
public class DirectSubclass extends BaseClass {
// overrides to make the methods public
@Override
public void doBase() {
super.doBase(... | 545 | 20 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/uselessoverridingmethod/GeneratedValue.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design.uselessoverridingmethod;
public @interface GeneratedValue {
GenerationType strategy() default GenerationType.AUTO;
}
| 260 | 25.1 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/uselessoverridingmethod/DirectSubclass2.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design.uselessoverridingmethod;
public class DirectSubclass2 extends DirectSubclass {
// useless overrides - it's already public
@Override
public void doBase() {
super.... | 553 | 22.083333 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/uselessoverridingmethod/UselessOverridingMethodHashCode.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design.uselessoverridingmethod;
public class UselessOverridingMethodHashCode {
@Override
public int hashCode() {
return super.hashCode();
}
@Override
public b... | 390 | 19.578947 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/uselessoverridingmethod/ExposingSerializer.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design.uselessoverridingmethod;
import java.io.IOException;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import org.w3c.dom.Node;
class ExposingSerializer ex... | 937 | 28.3125 | 118 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/uselessoverridingmethod/Serializer.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design.uselessoverridingmethod;
import java.io.IOException;
import java.io.OutputStream;
import org.w3c.dom.Node;
public class Serializer {
public Serializer(OutputStream out, Strin... | 412 | 18.666667 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/uselessoverridingmethod/TransitiveSubclass.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design.uselessoverridingmethod;
public class TransitiveSubclass extends OtherSubclass {
// overrides to make the methods public
@Override
public void doBase() {
super... | 553 | 20.307692 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/uselessoverridingmethod/Id.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design.uselessoverridingmethod;
public @interface Id {
}
| 189 | 20.111111 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/uselessoverridingmethod/GenerationType.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design.uselessoverridingmethod;
public enum GenerationType {
AUTO
}
| 204 | 19.5 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/uselessoverridingmethod/other/OtherClassInOtherPackage.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design.uselessoverridingmethod.other;
public class OtherClassInOtherPackage {
public void foo() {
DirectSubclassInOtherPackage instance = new DirectSubclassInOtherPackage();
... | 583 | 31.444444 | 97 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/uselessoverridingmethod/other/DirectSubclassInOtherPackage.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design.uselessoverridingmethod.other;
import net.sourceforge.pmd.lang.java.rule.design.uselessoverridingmethod.BaseClass;
public class DirectSubclassInOtherPackage extends BaseClass {
... | 677 | 23.214286 | 83 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/singularfield/NoThrowingCloseable.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design.singularfield;
public interface NoThrowingCloseable extends AutoCloseable {
@Override
void close();
}
| 249 | 21.727273 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/singularfield/Issue3303.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design.singularfield;
public class Issue3303 {
// "private" is a must for reproducing the problem
private final NoThrowingCloseable first;
Issue3303(NoThrowingCloseable first... | 578 | 23.125 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/donotextendjavalangerror/Error.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design.donotextendjavalangerror;
/**
* @author Akshat Bahety
* @since 6.4.0
*/
public class Error {
}
| 239 | 16.142857 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/internal/DataflowPassTest.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.internal;
import static org.hamcrest.MatcherAssert.assertThat;
import org.hamcrest.Matchers;
import org.junit.jupiter.api.Test;
import net.sourceforge.pmd.lang.java.BaseParserTest;
impor... | 930 | 24.861111 | 106 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/internal/JavaRuleUtilTest.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.internal;
import static net.sourceforge.pmd.lang.java.rule.internal.JavaRuleUtil.containsCamelCaseWord;
import static net.sourceforge.pmd.lang.java.rule.internal.JavaRuleUtil.startsWithCam... | 1,916 | 42.568182 | 104 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/types/InvocationMatcherTest.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.types;
import static net.sourceforge.pmd.lang.java.types.InvocationMatcher.parse;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import static... | 3,486 | 34.581633 | 112 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/types/TypesTreeDumpTest.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.types;
import java.util.List;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.junit.jupiter.api.Test;
import net.sourceforge.pmd.lang.ast.Node;
import net.sourceforge.pm... | 3,296 | 37.337209 | 120 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/types/GenericMethodReferenceTest.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.types;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.function.Supplier;
import org.checkerframework.... | 1,253 | 34.828571 | 101 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/types/TypeTestUtilTest.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.types;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
imp... | 11,280 | 36.108553 | 110 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/types/testdata/Overloads.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.types.testdata;
import static java.util.EnumSet.noneOf;
import java.util.Collections;
import java.util.EnumSet;
import java.util.List;
public class Overloads {
private Overloads() {
... | 1,365 | 22.152542 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/types/testdata/DummyCompiledClass.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.types.testdata;
public class DummyCompiledClass {
public String toString() {
return getClass().toString();
}
}
| 254 | 20.25 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/types/testdata/MutualTypeRecursion.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.types.testdata;
public class MutualTypeRecursion
<T extends MutualTypeRecursion<T, S>,
S extends MutualTypeRecursion<S, T>> {
}
| 269 | 19.769231 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/types/testdata/SomeEnum.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.types.testdata;
public enum SomeEnum {
FOO,
BAR
}
| 186 | 14.583333 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/types/testdata/MyListAbstract.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.types.testdata;
/**
* @see <a href="https://github.com/pmd/pmd/issues/3101">[java] NullPointerException when running PMD under JRE 11 #3101</a>
*/
public abstract class MyListAbstract<E> impl... | 413 | 24.875 | 124 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/types/testdata/LubTestData.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.types.testdata;
public class LubTestData {
public interface I1 {
}
public interface I2<T> extends I1 {
}
public interface I3 {
}
public interface I4 {
}
... | 921 | 17.078431 | 86 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/types/testdata/LocalGenericClass.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.types.testdata;
public class LocalGenericClass {
private LocalGenericClass() {
}
public static <T> void localClassInGeneric() {
class MyLocalClass implements MyCombiner<T... | 1,130 | 18.842105 | 80 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/types/testdata/ComparableList.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.types.testdata;
import java.util.ArrayList;
import java.util.List;
import org.checkerframework.checker.nullness.qual.NonNull;
// test class for intersections
public class ComparableList<T> ex... | 461 | 21 | 84 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/types/testdata/BoolLogic.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.types.testdata;
public class BoolLogic {
static False FALSE() { // SUPPRESS CHECKSTYLE NOW
return new False() { };
}
static True TRUE() { // SUPPRESS CHECKSTYLE NOW
... | 997 | 16.206897 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/types/testdata/GenericMethodReference.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.types.testdata;
import java.util.function.Supplier;
public final class GenericMethodReference {
{
// the constructor is not generic, so <Integer> is unused, but that should just be... | 1,359 | 35.756757 | 104 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/types/testdata/SomeClassWithAnon.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.types.testdata;
/**
* #2756
*/
public class SomeClassWithAnon {
{
new Runnable() {
@Override
public void run() {
}
};
}
}
| 318 | 11.269231 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/types/testdata/AnnotationWithEnum.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.types.testdata;
public @interface AnnotationWithEnum {
Foo value();
enum Foo {
A, B
}
}
| 237 | 14.866667 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/types/testdata/GenericFbound.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.types.testdata;
/**
* @author Clément Fournier
*/
public class GenericFbound<T extends GenericFbound<T>> {
public class Inst extends GenericFbound<Inst> {
}
public class InstRa... | 416 | 15.68 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/types/testdata/MyList.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.types.testdata;
/**
* @see <a href="https://github.com/pmd/pmd/issues/3101">[java] NullPointerException when running PMD under JRE 11 #3101</a>
*/
public interface MyList<E> {
<E> MyList... | 336 | 23.071429 | 124 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/types/testdata/TypeInferenceTestCases.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.types.testdata;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.function.Supplier;
import... | 1,079 | 21.5 | 81 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/types/testdata/SomeConstants.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.types.testdata;
public class SomeConstants {
public static short aShort = 1;
public static byte aByte = 1;
private SomeConstants() {
}
}
| 283 | 16.75 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/types/internal/infer/InferenceCtxUnitTests.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.types.internal.infer;
import static net.sourceforge.pmd.lang.java.types.TestUtilitiesForTypesKt.captureMatcher;
import static net.sourceforge.pmd.lang.java.types.internal.infer.BaseTypeInferenc... | 10,386 | 31.561129 | 105 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/types/internal/infer/BaseTypeInferenceUnitTest.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.types.internal.infer;
import static net.sourceforge.pmd.util.CollectionUtil.listOf;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertThr... | 8,554 | 32.681102 | 116 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/internal/JavaViolationDecoratorTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.internal;
import static net.sourceforge.pmd.RuleViolation.CLASS_NAME;
import static net.sourceforge.pmd.RuleViolation.METHOD_NAME;
import static net.sourceforge.pmd.RuleViolation.PACKAGE_NAME;... | 7,429 | 39.380435 | 120 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/coverage/PMDCoverageTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.coverage;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.emptyString;
import static org.hamcrest.Matchers.is... | 3,704 | 36.806122 | 105 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/cpd/MatchAlgorithmTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.cpd;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import java.io.IOException;
import java.util.HashMap;
import java.util.Iter... | 3,300 | 36.089888 | 109 | java |
pmd | pmd-master/pmd-java/src/test/java/net/sourceforge/pmd/cpd/JavaTokenizerTest.java | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.cpd;
import java.util.Properties;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import net.sourceforge.pmd.cpd.test.CpdTextComparisonTest;
// TODO - enable test
@Disabled(... | 3,221 | 24.776 | 98 | java |
pmd | pmd-master/pmd-java/src/test/java/javasymbols/testdata/Thread.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package javasymbols.testdata;
/**
* Shadows java.lang.Thread
*
*/
public class Thread {
}
| 182 | 13.076923 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/javasymbols/testdata/NestedClasses.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package javasymbols.testdata;
public class NestedClasses {
void foo() {
class InMethod {
class IInMethod {
}
}
}
public class Inner {
public Inner() {
}
... | 403 | 11.242424 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/javasymbols/testdata/SomeClassA.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package javasymbols.testdata;
public class SomeClassA {
}
| 148 | 13.9 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/javasymbols/testdata/Enums.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package javasymbols.testdata;
public class Enums {
public enum Empty {}
public enum SomeConstants {A, B}
}
| 208 | 12.933333 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/javasymbols/testdata/BrokenGeneric.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package javasymbols.testdata;
import net.sourceforge.pmd.lang.java.symbols.internal.asm.Classpath;
/**
* For this test we exclude SuperItf.class from the {@link Classpath}
* to mimic an incomplete classpath.
*
* @see net.sourc... | 546 | 22.782609 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/javasymbols/testdata/TestCase1.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package javasymbols.testdata;
public class TestCase1 {
String foo;
SomeClassA a;
}
| 185 | 10.625 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/javasymbols/testdata/Statics.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package javasymbols.testdata;
public class Statics extends StaticsSuper {
public static final int PUBLIC_FIELD = 0;
public final int publicField = 0;
protected static final int PROTECTED_FIELD = 0;
static final in... | 1,100 | 12.107143 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/javasymbols/testdata/StaticNameCollision.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package javasymbols.testdata;
public class StaticNameCollision {
public static final int Ola = 0;
public static int Ola() {
return 0;
}
public static String publicMethod() {
return "";
}
... | 435 | 13.533333 | 79 | java |
pmd | pmd-master/pmd-java/src/test/java/javasymbols/testdata/StaticsSuper.java | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package javasymbols.testdata;
public class StaticsSuper {
public static void oha() {
}
public static int oha;
public static class oha {}
}
| 249 | 12.888889 | 79 | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.