java.lang.Object
edu.hm.hafner.analysis.DuplicationGroup
- All Implemented Interfaces:
Serializable
Links all affected files of a duplicated code fragment. A code duplication could be reported by a code duplication
detector like CPD, DupFinder, or Simian.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new duplication group.DuplicationGroup(String codeFragment) Creates a new duplication group for the specified code fragment. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the specified duplication (represented by anIssueinstance) to this group of duplications.booleanReturns the code fragment that has been duplicated by all members of this group.inthashCode()voidsetCodeFragment(String codeFragment) Sets the code fragment of the duplication group.
-
Constructor Details
-
DuplicationGroup
Creates a new duplication group for the specified code fragment.- Parameters:
codeFragment- the copied code fragment
-
DuplicationGroup
public DuplicationGroup()Creates a new duplication group. The code fragment is not set and should be set usingadd(Issue).
-
-
Method Details
-
setCodeFragment
Sets the code fragment of the duplication group. Once this value has been set to a non-empty value it will not change again.- Parameters:
codeFragment- the copied code fragment
-
add
Adds the specified duplication (represented by anIssueinstance) to this group of duplications.- Parameters:
issue- the issues that references the position of the duplicated code fragment
-
getCodeFragment
Returns the code fragment that has been duplicated by all members of this group.- Returns:
- the duplicated code fragment
-
getDuplications
-
equals
-
hashCode
public int hashCode()
-