Collecting data from Vector to Map
Beware of hard-coding the first element of a list like aggregateFeaturesForML.get(0). This can throw an exception is aggregateFeaturesForML is empty so you should check for that first.
Do not compare String with == (or !=). In the following

if(ip != previousIp)


you are comparing the Strings ip and previousIp with !=. Strings are compared using their equals method, so you should have instead:

if(!ip.equals(previousIp))

Prefer to program against interfaces. Instead of 

HashMap&lt;String, String&gt; mapForIP = aggregator.get(previousIp);


use:

Map&lt;String, String&gt; mapForIP = aggregator.get(previousIp);





As a side-note, if you are using Java 8, your code could be written a lot more simply using the Stream API, that directly provides a way to group elements with a classifier, using the groupingBy collector. In this case, when two elements are classified the same way, they are collected into a Map with the toMap collector.

Map&lt;String, Map&lt;String, String&gt;&gt; aggregator =
    aggregateFeaturesForML.stream()
                          .collect(Collectors.groupingBy(
                              SingleResult::getSourceip,
                              Collectors.toMap(SingleResult::getKey, SingleResult::getValue)
                          ));