@Test public void testChangeComparison() throws FileAnalysisException, IOException { final String sig_chg_json = FileUtil.readFile( Paths.get("./src/test/resources/methodBody/deserialize/signatureChange.json")); final SignatureChange ddf = (ASTSignatureChange) JacksonUtil.asObject(sig_chg_json, custom_deserializers, ASTSignatureChange.class); SignatureComparator signComparator = new ASTSignatureComparator(); SignatureChange ddt = signComparator.computeChange(signatureDef, signatureUnderTest); this.setupDefectiveConstruct(); this.setupFixedConstruct(); this.setupConstructUnderTest(); SignatureChange dtf = signComparator.computeChange(signatureUnderTest, signatureFix); final Set<Object> i_dt = ASTUtil.intersectSourceCodeChanges(ddt.getModifications(), ddf.getModifications(), false); final Set<Object> i_tf = ASTUtil.intersectSourceCodeChanges(dtf.getModifications(), ddf.getModifications(), false); this.setupConstructUnderTest(); }
@Override public SignatureChange computeChange(Signature _a, Signature _b) { SignatureChange astChange = new ASTSignatureChange(_a, _b); astChange.getModifications(); return astChange; }
ASTSignatureComparator implements SignatureComparator { @Override public SignatureChange computeChange(Signature _a, Signature _b) { SignatureChange astChange = new ASTSignatureChange(_a, _b); astChange.getModifications(); return astChange; } }
ASTSignatureComparator implements SignatureComparator { @Override public SignatureChange computeChange(Signature _a, Signature _b) { SignatureChange astChange = new ASTSignatureChange(_a, _b); astChange.getModifications(); return astChange; } ASTSignatureComparator();  ASTSignatureComparator(double stringSimilarity); }
ASTSignatureComparator implements SignatureComparator { @Override public SignatureChange computeChange(Signature _a, Signature _b) { SignatureChange astChange = new ASTSignatureChange(_a, _b); astChange.getModifications(); return astChange; } ASTSignatureComparator();  ASTSignatureComparator(double stringSimilarity); @Override float computeSimilarity(Signature _a, Signature _b); @Override SignatureChange computeChange(Signature _a, Signature _b); int getTotalNumChanges(); int getMatchedNumChanges(); @Override boolean containsChange(Signature _s, SignatureChange _change); double getStringSimilarityThreshold(); void setStringSimilarityThreshold(double _threshold); Node searchForNode(SourceCodeChange change, Node astRoot); boolean searchForEntity(SourceCodeChange change, Node astRoot); boolean searchForEntity(String _entityUniqueName, Node astRoot); }
ASTSignatureComparator implements SignatureComparator { @Override public SignatureChange computeChange(Signature _a, Signature _b) { SignatureChange astChange = new ASTSignatureChange(_a, _b); astChange.getModifications(); return astChange; } ASTSignatureComparator();  ASTSignatureComparator(double stringSimilarity); @Override float computeSimilarity(Signature _a, Signature _b); @Override SignatureChange computeChange(Signature _a, Signature _b); int getTotalNumChanges(); int getMatchedNumChanges(); @Override boolean containsChange(Signature _s, SignatureChange _change); double getStringSimilarityThreshold(); void setStringSimilarityThreshold(double _threshold); Node searchForNode(SourceCodeChange change, Node astRoot); boolean searchForEntity(SourceCodeChange change, Node astRoot); boolean searchForEntity(String _entityUniqueName, Node astRoot);  }