diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/client/impl/ActivityClusterGraphBuilder.java b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/client/impl/ActivityClusterGraphBuilder.java
index 3628e96..e4a3388 100644
--- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/client/impl/ActivityClusterGraphBuilder.java
+++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/client/impl/ActivityClusterGraphBuilder.java
@@ -50,7 +50,7 @@
                     for (IConnectorDescriptor conn : inputList) {
                         ActivityId inTask = jag.getProducerActivity(conn.getConnectorId());
                         if (!eqSet.contains(inTask)) {
-                            return Pair.<ActivityId, ActivityId> of(t, inTask);
+                            return Pair.of(t, inTask);
                         }
                     }
                 }
@@ -59,7 +59,7 @@
                     for (IConnectorDescriptor conn : outputList) {
                         ActivityId outTask = jag.getConsumerActivity(conn.getConnectorId());
                         if (!eqSet.contains(outTask)) {
-                            return Pair.<ActivityId, ActivityId> of(t, outTask);
+                            return Pair.of(t, outTask);
                         }
                     }
                 }
diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/ActivityCluster.java b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/ActivityCluster.java
index 94e9c74..22240cb 100644
--- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/ActivityCluster.java
+++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/ActivityCluster.java
@@ -110,9 +110,7 @@
         insertIntoIndexedMap(activityInputMap, consumerActivity.getActivityId(), consumerPort, connector);
         insertIntoIndexedMap(activityOutputMap, producerActivity.getActivityId(), producerPort, connector);
         connectorActivityMap.put(connector.getConnectorId(),
-                Pair.<Pair<IActivity, Integer>, Pair<IActivity, Integer>> of(
-                        Pair.<IActivity, Integer> of(producerActivity, producerPort),
-                        Pair.<IActivity, Integer> of(consumerActivity, consumerPort)));
+                Pair.of(Pair.of(producerActivity, producerPort), Pair.of(consumerActivity, consumerPort)));
         connectorRecordDescriptorMap.put(connector.getConnectorId(), recordDescriptor);
     }
 
diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/JobSpecification.java b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/JobSpecification.java
index b0a8017..829c550 100644
--- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/JobSpecification.java
+++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/JobSpecification.java
@@ -144,9 +144,7 @@
         insertIntoIndexedMap(opInputMap, consumerOp.getOperatorId(), consumerPort, conn);
         insertIntoIndexedMap(opOutputMap, producerOp.getOperatorId(), producerPort, conn);
         connectorOpMap.put(conn.getConnectorId(),
-                Pair.<Pair<IOperatorDescriptor, Integer>, Pair<IOperatorDescriptor, Integer>> of(
-                        Pair.<IOperatorDescriptor, Integer> of(producerOp, producerPort),
-                        Pair.<IOperatorDescriptor, Integer> of(consumerOp, consumerPort)));
+                Pair.of(Pair.of(producerOp, producerPort), Pair.of(consumerOp, consumerPort)));
     }
 
     public void setProperty(String name, Serializable value) {
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/partitions/PartitionMatchMaker.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/partitions/PartitionMatchMaker.java
index ad338e3..ac29b53 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/partitions/PartitionMatchMaker.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/partitions/PartitionMatchMaker.java
@@ -59,7 +59,7 @@
             while (i.hasNext()) {
                 PartitionRequest req = i.next();
                 if (partitionDescriptor.getState().isAtLeast(req.getMinimumState())) {
-                    matches.add(Pair.<PartitionDescriptor, PartitionRequest> of(partitionDescriptor, req));
+                    matches.add(Pair.of(partitionDescriptor, req));
                     i.remove();
                     matched = true;
                     if (!partitionDescriptor.isReusable()) {
@@ -95,7 +95,7 @@
             while (i.hasNext()) {
                 PartitionDescriptor descriptor = i.next();
                 if (descriptor.getState().isAtLeast(partitionRequest.getMinimumState())) {
-                    match = Pair.<PartitionDescriptor, PartitionRequest> of(descriptor, partitionRequest);
+                    match = Pair.of(descriptor, partitionRequest);
                     if (!descriptor.isReusable()) {
                         i.remove();
                     }
