Package ch.uzh.ifi.seal.changedistiller.distilling

Examples of ch.uzh.ifi.seal.changedistiller.distilling.Distiller


        String nameR = refactoringHelper.extractShortName(rightDrn.getName());
        return !nameL.equals(nameR);
    }

    private void extractChanges(Node left, Node right, StructureEntityVersion rootEntity) {
        Distiller distiller = fDistillerFactory.create(rootEntity);
        distiller.extractClassifiedSourceCodeChanges(left, right);
    }
View Full Code Here


    public void unchangedMethodBodyShouldNotHaveAnyChanges() throws Exception {
        JavaCompilation compilation = CompilationUtils.compileFile(TEST_DATA + "TestLeft.java");
        Node rootLeft = convertMethodBody("foo", compilation);
        Node rootRight = convertMethodBody("foo", compilation);
        StructureEntityVersion structureEntity = new StructureEntityVersion(JavaEntityType.METHOD, "foo", 0);
        Distiller distiller = getDistiller(structureEntity);
        distiller.extractClassifiedSourceCodeChanges(rootLeft, rootRight);
        assertThat(structureEntity.getSourceCodeChanges().isEmpty(), is(true));
    }
View Full Code Here

        JavaCompilation compilationLeft = CompilationUtils.compileFile(TEST_DATA + "TestLeft.java");
        JavaCompilation compilationRight = CompilationUtils.compileFile(TEST_DATA + "TestRight.java");
        Node rootLeft = convertMethodBody("foo", compilationLeft);
        Node rootRight = convertMethodBody("foo", compilationRight);
        StructureEntityVersion structureEntity = new StructureEntityVersion(JavaEntityType.METHOD, "foo", 0);
        Distiller distiller = getDistiller(structureEntity);
        distiller.extractClassifiedSourceCodeChanges(rootLeft, rootRight);
        assertThat(structureEntity.getSourceCodeChanges().size(), is(11));
    }
View Full Code Here

        structureEntity = new StructureEntityVersion(JavaEntityType.METHOD, methodName, 0);
        distill(leftMethod, rightMethod);
    }

    private void distill(Node leftMethod, Node rightMethod) {
        Distiller distiller = getDistiller(structureEntity);
        distiller.extractClassifiedSourceCodeChanges(leftMethod, rightMethod);
    }
View Full Code Here

    public void unchangedMethodDeclarationShouldNotHaveAnyChanges() throws Exception {
        JavaCompilation compilation = CompilationUtils.compileFile(TEST_DATA + "TestLeft.java");
        Node rootLeft = convertMethodDeclaration("foo", compilation);
        Node rootRight = convertMethodDeclaration("foo", compilation);
        StructureEntityVersion structureEntity = new StructureEntityVersion(JavaEntityType.METHOD, "foo", 0);
        Distiller distiller = getDistiller(structureEntity);
        distiller.extractClassifiedSourceCodeChanges(rootLeft, rootRight);
        assertThat(structureEntity.getSourceCodeChanges().isEmpty(), is(true));
    }
View Full Code Here

        JavaCompilation compilationLeft = CompilationUtils.compileFile(TEST_DATA + "TestLeft.java");
        JavaCompilation compilationRight = CompilationUtils.compileFile(TEST_DATA + "TestRight.java");
        Node rootLeft = convertMethodDeclaration("foo", compilationLeft);
        Node rootRight = convertMethodDeclaration("foo", compilationRight);
        StructureEntityVersion structureEntity = new StructureEntityVersion(JavaEntityType.METHOD, "foo", 0);
        Distiller distiller = getDistiller(structureEntity);
        distiller.extractClassifiedSourceCodeChanges(rootLeft, rootRight);
        assertThat(structureEntity.getSourceCodeChanges().size(), is(2));
    }
View Full Code Here

      JavaCompilation compilationLeft = CompilationUtils.compileFile(TEST_DATA + "TestLeft.java");
      JavaCompilation compilationRight = CompilationUtils.compileFile(TEST_DATA + "TestRight.java");
      Node rootLeft = convertFieldDeclaration("arrayField", compilationLeft);
      Node rootRight = convertFieldDeclaration("arrayField", compilationRight);
      StructureEntityVersion structureEntity = new StructureEntityVersion(JavaEntityType.FIELD, "arrayField", 0);
      Distiller distiller = getDistiller(structureEntity);
      distiller.extractClassifiedSourceCodeChanges(rootLeft, rootRight);
     
      List<SourceCodeChange> changes = structureEntity.getSourceCodeChanges();
      assertThat(changes.size(), is(1));
     
      SourceCodeChange singleChange = changes.get(0);
View Full Code Here

TOP

Related Classes of ch.uzh.ifi.seal.changedistiller.distilling.Distiller

Copyright © 2018 www.massapicom. 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.