All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.refactoringminer.astDiff.actions.ExtendedAbstractITreeClassifier Maven / Gradle / Ivy

package org.refactoringminer.astDiff.actions;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

import com.github.gumtreediff.actions.Diff;
import com.github.gumtreediff.actions.model.Action;
import com.github.gumtreediff.tree.Tree;

/**
 * @author  Pourya Alikhani Fard [email protected]
 */
public abstract class ExtendedAbstractITreeClassifier implements ExtendedTreeClassifier {
	protected final Diff diff;
	protected final Set srcUpdTrees = new HashSet<>();
	protected final Set dstUpdTrees = new HashSet<>();
	protected final Set srcMvTrees = new HashSet<>();
	protected final Set dstMvTrees = new HashSet<>();
	protected final Set srcDelTrees = new HashSet<>();
	protected final Set dstAddTrees = new HashSet<>();
	protected final Map dstMmTrees = new HashMap<>();
	protected final Map srcMmTrees = new HashMap<>();
	protected final Map dstMoveInTreeMap = new HashMap<>();
	protected final Map srcMoveOutTreeMap = new HashMap<>();

	public ExtendedAbstractITreeClassifier(ASTDiff diff) {
		this.diff = diff;
	}

	protected abstract void classify();

	public Set getUpdatedSrcs() {
		return srcUpdTrees;
	}

	public Set getUpdatedDsts() {
		return dstUpdTrees;
	}

	public Set getMovedSrcs() {
		return srcMvTrees;
	}

	public Set getMovedDsts() {
		return dstMvTrees;
	}

	public Set getDeletedSrcs() {
		return srcDelTrees;
	}

	public Set getInsertedDsts() {
		return dstAddTrees;
	}

	public Map getMultiMapSrc() {
		return srcMmTrees;
	}

	public Map getMultiMapDst() {
		return dstMmTrees;
	}

	public Map getDstMoveInTreeMap() {
		return dstMoveInTreeMap;
	}

	public Map getSrcMoveOutTreeMap() {
		return srcMoveOutTreeMap;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy