Class TLSHStateVertexImpl
- java.lang.Object
-
- com.crawljax.core.state.StateVertexImpl
-
- com.crawljax.stateabstractions.dom.TLSHStateVertexImpl
-
- All Implemented Interfaces:
StateVertex,Serializable
public class TLSHStateVertexImpl extends StateVertexImpl
The state vertex class which represents a state in the browser. When iterating over the possible candidate elements every time a candidate is returned its removed from the list so it is a one time only access to the candidates.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private EditDistanceComparatoreditDistanceComparatorprivate static org.slf4j.LoggerLOGprivate doublemaxRawprivate DOMConfiguration.Modemodeprivate static longserialVersionUIDprivate doublethresholdprivate StringusedDom-
Fields inherited from interface com.crawljax.core.state.StateVertex
INDEX_ID
-
-
Constructor Summary
Constructors Constructor Description TLSHStateVertexImpl(int id, String url, String name, String dom, String strippedDom, double threshold, DOMConfiguration.Mode mode, EditDistanceComparator editDistanceComparator)Defines a State.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object object)TODO in the equals, we could also measure the distance between two pHashesdoublegetDist(StateVertex vertexOfGraph)private StringgetUsedDom()inthashCode()StringtoString()-
Methods inherited from class com.crawljax.core.state.StateVertexImpl
addFragments, getCandidateElement, getCandidateElement, getCandidateElements, getClosestDomFragment, getClosestFragment, getClosestFragment, getCluster, getDistToNearestState, getDocument, getDom, getFragments, getId, getName, getNearestState, getRootFragment, getSerialversionuid, getStrippedDom, getUrl, hasNearDuplicate, hasUnexploredActions, inThreshold, isNearDuplicate, isOnURL, setCluster, setDirectAccess, setDistToNearestState, setDocument, setElementsFound, setFragments, setHasNearDuplicate, setNearestState, setOnURL
-
-
-
-
Field Detail
-
LOG
private static final org.slf4j.Logger LOG
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
threshold
private final double threshold
-
maxRaw
private final double maxRaw
- See Also:
- Constant Field Values
-
mode
private final DOMConfiguration.Mode mode
-
usedDom
private final String usedDom
-
editDistanceComparator
private final EditDistanceComparator editDistanceComparator
-
-
Constructor Detail
-
TLSHStateVertexImpl
public TLSHStateVertexImpl(int id, String url, String name, String dom, String strippedDom, double threshold, DOMConfiguration.Mode mode, EditDistanceComparator editDistanceComparator)Defines a State.- Parameters:
url- the current url of the statename- the name of the statedom- the current DOM tree of the browserstrippedDom- the stripped dom by the OracleComparatorsthreshold-mode-
-
-
Method Detail
-
hashCode
public int hashCode()
- Overrides:
hashCodein classStateVertexImpl
-
equals
public boolean equals(Object object)
TODO in the equals, we could also measure the distance between two pHashes- Overrides:
equalsin classStateVertexImpl
-
toString
public String toString()
- Overrides:
toStringin classStateVertexImpl
-
getDist
public double getDist(StateVertex vertexOfGraph)
- Specified by:
getDistin interfaceStateVertex- Overrides:
getDistin classStateVertexImpl
-
getUsedDom
private String getUsedDom()
-
-