Passing data from one model to another
Is it too awful code?


Not too awful and not even bad, but the huge wall of code looks ugly.

There are a few minor issues like missing blank after "for" in

for(ProcessStep processStep : process.getSteps()){


and before "{" in

if (activity.getId().equals(vps.getActivityId())){


but that's something your IDE can do for you (Ctrl-Shift-F in Eclipse).



Otherwise, all you need is to extract a few methods like

private VisualProcessStep toVisualProcessStep(Process process, ProcessStep processStep) {
    VisualProcessStep result = new VisualProcessStep();
    result.setActivityId(processStep.getActivityId());
    result.setDefinition(processStep.getDefinition());
    result.setId(processStep.getId());
    result.setParameters(processStep.getParameters());
    result.setStatus(processStep.getStatus());
    for (Activity activity : process.getActivities()) {
        if (activity.getId().equals(result.getActivityId())) {
            result.setActivityName(activity.getName());
            result.setActivityRealization(activity.getRealization());  
            break;
        }
    }
    return result;
}


This can be repeated many times and you surely shouldn't extract everything. When the methods don't get used elsewhere, this is very subjective as you're trading a too long method for too many methods.

The sweet spot are methods somewhere about 15 lines long. As all the methods do is just copying everything and there isn't much to think about, they may be a bit longer. I'd personally split it into probably 3 methods.



Obviously, there may be a smarter way avoiding the manual copying. It surely can be done via reflection, but reflection is verbose and slow and ugly itself, so I wouldn't consider it for this task.

Maybe you could create a constructor (or a factory method) for VisualProcessStep?