Examples of SnapshotAnalyzer


Examples of org.evolizer.famix.model.utils.SnapshotAnalyzer

     * {@inheritDoc}
     */
    @Override
    protected double calculate() {
        double value = 0d;
        SnapshotAnalyzer snapshotAnalyzer = new SnapshotAnalyzer(getCurrentSession());
        List<AbstractFamixEntity> entities = snapshotAnalyzer.getDescendants(getCurrentEntity());
        for (AbstractFamixEntity famixEntity : entities) {
            if (famixEntity instanceof FamixAttribute) {
                FamixAttribute method = (FamixAttribute) famixEntity;
                if ((method.getModifiers() & AbstractFamixEntity.MODIFIER_STATIC) == AbstractFamixEntity.MODIFIER_STATIC) {
                    value += 1d;
View Full Code Here

Examples of org.evolizer.famix.model.utils.SnapshotAnalyzer

     * {@inheritDoc}
     */
    @Override
    protected double calculate() {
        double value = 0d;
        SnapshotAnalyzer snapshotAnalyzer = new SnapshotAnalyzer(getCurrentSession());
        List<AbstractFamixEntity> entities = new ArrayList<AbstractFamixEntity>();
        entities.add(getCurrentEntity());
        List<AbstractFamixGeneralization> generalizations = snapshotAnalyzer.queryAssociationsOfEntities(entities, AbstractFamixGeneralization.class, "to");
        value = generalizations.size();
        return value;
    }
View Full Code Here

Examples of org.evolizer.famix.model.utils.SnapshotAnalyzer

     * @param metricIdentifier the metric identifier
     *
     * @throws EvolizerException the evolizer exception
     */
    public void updateMetricValues(String metricIdentifier) throws EvolizerException {
        SnapshotAnalyzer snapshotAnalyzer = fGraphPanel.getGraphLoader().getSnapshotAnalyzer();
        DependencyGraph graph = fGraphPanel.getGraph();
        NodeMap map = graph.getRegisteredNodeMaps()[0];
        Node[] nodes = graph.getNodeArray();
        for (int i = 0; i < nodes.length; i++) {
            AbstractFamixEntity entity = (AbstractFamixEntity) map.get(nodes[i]);
            // check if entity is already processed
            // entities ending with <clinit>() or <oinit>() must be ignored to
            // get suitable visual data
            Set<String> possibleMetrics = MetricStore.listMetricsFor(entity);
            if (!metricIdentifier.equalsIgnoreCase(PolymetricViewControllerView.METRIC_UNIFORM)) {
                if (possibleMetrics.contains(metricIdentifier)) {
                    CompositeKey<AbstractFamixEntity, String> key = new CompositeKey<AbstractFamixEntity, String>(entity, metricIdentifier);
                    if (!fFamixEntityMetricToValueMap.containsKey(key
                            && !(entity.getUniqueName().endsWith(AbstractFamixEntity.CLASS_INIT_METHOD)
                                    || entity.getUniqueName().endsWith(AbstractFamixEntity.OBJECT_INIT_METHOD))) {
                        Float value = 0f;
                        value = new Float(MetricStore.calculateMetricValue(entity, metricIdentifier, snapshotAnalyzer.getEvolizerSession()));
                        fFamixEntityMetricToValueMap.put(key, value);

                        if (fMaxMetricValues.get(metricIdentifier).get(entity.getClass()) < value) {
                            fMaxMetricValues.get(metricIdentifier).put(entity.getClass(), value);
                        }
View Full Code Here

Examples of org.evolizer.famix.model.utils.SnapshotAnalyzer

     */
    @Override
    protected double calculate() {
        double value = 0d;
        FamixClass famixClass = (FamixClass) getCurrentEntity();
        SnapshotAnalyzer snapshotAnalyzer = new SnapshotAnalyzer(getCurrentSession());
        List<FamixClass> entities = new ArrayList<FamixClass>();
        entities.add(famixClass);
        Set<FamixClass> dependentEntities = new HashSet<FamixClass>();
        value = snapshotAnalyzer.queryDependentEntities(
                entities,
                dependentEntities,
                FamixClass.class,
                AbstractFamixGeneralization.class,
                "from",
View Full Code Here

Examples of org.evolizer.famix.model.utils.SnapshotAnalyzer

     */
    @Override
    protected double calculate() {
        double value = 0d;
        FamixClass famixClass = (FamixClass) getCurrentEntity();
        SnapshotAnalyzer snapshotAnalyzer = new SnapshotAnalyzer(getCurrentSession());
        List<FamixClass> superClasses = querySuperClasses();

        List<FamixInvocation> invocations = snapshotAnalyzer.queryAssociationsOfEntities(
                famixClass.getMethods(),
                FamixInvocation.class,
                "from"
        );

View Full Code Here

Examples of org.evolizer.famix.model.utils.SnapshotAnalyzer

        return new Class<?>[] { org.evolizer.famix.model.entities.FamixClass.class };
    }
   
    protected List<FamixClass> querySuperClasses() {
        FamixClass famixClass = (FamixClass) getCurrentEntity();
        SnapshotAnalyzer snapshotAnalyzer = new SnapshotAnalyzer(getCurrentSession());
        List<FamixClass> entities = new ArrayList<FamixClass>();
        entities.add(famixClass);
        Set<FamixClass> dependentEntities = new HashSet<FamixClass>();
        snapshotAnalyzer.queryDependentEntities(
                entities,
                dependentEntities,
                FamixClass.class,
                AbstractFamixGeneralization.class,
                "from",
View Full Code Here

Examples of org.evolizer.famix.model.utils.SnapshotAnalyzer

     * {@inheritDoc}
     */
    @Override
    protected double calculate() {
        double value = 0d;
        SnapshotAnalyzer snapshotAnalyzer = new SnapshotAnalyzer(getCurrentSession());
        List<AbstractFamixEntity> entities = snapshotAnalyzer.getDescendants(getCurrentEntity());
        List<FamixInvocation> invocations = snapshotAnalyzer.queryAssociationsOfEntities(entities, FamixInvocation.class, "from");
        value = invocations.size();

        return value;
    }
View Full Code Here

Examples of org.evolizer.famix.model.utils.SnapshotAnalyzer

   * {@inheritDoc}
   */
  @Override
  protected double calculate() {
      double value = 0d;
      SnapshotAnalyzer snapshotAnalyzer = new SnapshotAnalyzer(getCurrentSession());
      List<AbstractFamixEntity> entities = snapshotAnalyzer.getDescendants(getCurrentEntity());
      List<FamixInvocation> invocations = snapshotAnalyzer.queryAssociationsOfEntities(entities, FamixInvocation.class, "to");
      value = invocations.size();

      return value;
  }
View Full Code Here

Examples of org.evolizer.famix.model.utils.SnapshotAnalyzer

     * {@inheritDoc}
     */
    @Override
    protected double calculate() {
        double value = 0d;
        SnapshotAnalyzer snapshotAnalyzer = new SnapshotAnalyzer(getCurrentSession());
        List<AbstractFamixEntity> entities = snapshotAnalyzer.getDescendants(getCurrentEntity());
        for (AbstractFamixEntity famixEntity : entities) {
            if (famixEntity instanceof FamixMethod) {
                FamixMethod method = (FamixMethod) famixEntity;
                if ((method.getModifiers() & AbstractFamixEntity.MODIFIER_STATIC) != AbstractFamixEntity.MODIFIER_STATIC) {
                    value += 1d;
View Full Code Here

Examples of org.evolizer.famix.model.utils.SnapshotAnalyzer

            // initialize db connection
            IJavaProject selectedProject = selectionHandler.getSelectedProject();
            String dbUrl = initDatabaseConfiguration(selectedProject.getProject());

            IEvolizerSession session = EvolizerSessionHandler.getHandler().getCurrentSession(dbUrl);
            SnapshotAnalyzer snapshotAnalyzer = new SnapshotAnalyzer(session);
            fGraphPanel = new DAForJavaGraphPanel(new GraphLoader(snapshotAnalyzer));
            fGraphPanel.initGraphPanel();

//            site.getWorkbenchWindow().getActivePage().addPartListener(fPartListener);
            initDragAndDrop();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.