-
-
- Tips and Tricks
Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering
Release date: Tuesday 07.01.14 - Due date: Sunday, 12.01.14, 23:59
8 points |
---|
In case you start to work on software developed by others, you might find that they used in code, models and documents
While this might have been ok for the others as they knew what they have been talking about, every newcomer needs to learn
This is a reverse engineering the knowledge. In case you can (partially) remove these difficulties, you are doing reengineering.
Let's do something similar for ATSC knowledge:
a) We used the word “extend” in different contexts. Give for each of the five contexts a definition (2-3 sentences) of the word “extend”:
b) Describe the abstract idea that all these concepts have in common (2-3 sentences).
c) We introduced the two concepts listed below. Give for each a definition and describe how they relate to the other concepts (2-5 sentences):
10 points |
---|
Check out the following projects from the samplesolutions (!) folder of the SVN:
LibsForJHotDraw
(Libraries used by JHotDraw)JHotDraw60b1
(JHotDraw in version 60b1, latest version compatible with the tests.)TestJHotDraw03
(A few tests for JHotDraw)AJHotDraw03
(A version of JHotDraw with some aspects. Not required. Maybe interesting.)
If you want to see JHotDraw at work right click on the file JavaDrawApp.java
in JHotDraw60b1/src/org.jhotdraw.samples.javadraw
and select “Run As > AspectJ/Java Application”.
From your group's repository check out:
A10_T50_DynamicFeatureLocation
(This is the only (!) project where we expect changes.)Your task is to write an aspect to instrument the code to produce a table of the following form:
Test 1 | Test 2 | |
---|---|---|
Class A | 1 | 0 |
Class B | 1 | 1 |
Where 1 means a method of the class is executed during the execution of the test. Otherwise 0.
We think it's the easiest to create the table in Java, but you may as well post-process your data in a spreadsheet application or a text editor.
As result we expect the following content in the following files in the A10_T50_DynamicFeatureLocation
project:
dynamic.analysis.ClassesUsedByTestTracing.aj
: The tracing aspectResult.csv
: The table “class x used by test”. For details about the format see in the file.UsedByAllTest.txt
: The classes used by all tests.UsedByPasteCommandTestOnly.txt
: The classes used just by the PasteCommandTest
To run the tests right click on the file TestAll.java
in TestJHotDraw03/src/test/org.jhotdraw.commands
and select “Run As > JUnit Test”.
[5+5+5 points] |
---|
The static feature location we presented in the lecture aims at providing the same information as the dynamic feature location but without executing the program. The ideal solution for this task would be an improved executable version of the naive static feature location that we sketched in the lecture plus the result. This is too much and most of you will not have the tools to solve it. Therefore we ask for the following:
a) An [untested but reasonably correct] implementation of the “naive static feature location” from slide 17 in one of the following languages:
class(ID, Name), method(ID, Name)
, field(ID, Name)
, class_contains_method(Class, Method)
, class_contains_field(Class, Field)
, class_extends_class(Class, ExtendedClass)
, field_has_type(Field, Class)
, method_calls_method(Method, CalledMethod)
, method_overrides_method(Method, OverridenMethod)
, method_accesses_field(Method, Field)
.1)b) (Just for completeness. We don't think this is possible to solve in a few hours.) An executable implementation of the analysis. If you execute it, you will quickly realize that the precision needs to be improved. Improve it at least a bit.
c) The result of this analysis for the same features as in Task 50 (i.e. “InsertImage”, “ChangeAttribute”, “Paste”, “Undo”). As you probably have no running implementation2), you may use the Call Hierarchy View provided by eclipse. Select the right methods in the test cases 3) and on each right click and select “Open in Call Hierarchy”. Expand the tree completely and write down the class names. Compare your result with the result in Task 50.
8 points |
---|
If you use external sources make sure that you cite them.