Program: 176002
Project: 176002
Buggy source:
@Override public void persistJoinTable(JoinTableData joinTableData){
  String tableName=joinTableData.getJoinTableName();
  String inverseJoinColumn=joinTableData.getInverseJoinColumnName();
  String joinColumn=joinTableData.getJoinColumnName();
  Map<Object,Set<Object>> joinTableRecords=joinTableData.getJoinTableRecords();
  Object connection=null;
  Pipeline pipeline=null;
  try {
    connection=getConnection();
    if (resource == null) {
      pipeline=((Jedis)connection).pipelined();
    }
    Set<Object> joinKeys=joinTableRecords.keySet();
    for (    Object joinKey : joinKeys) {
      String joinKeyAsStr=PropertyAccessorHelper.getString(joinKey);
      Set<Object> inverseKeys=joinTableRecords.get(joinKey);
      for (      Object inverseKey : inverseKeys) {
        Map<byte[],byte[]> redisFields=new HashMap<byte[],byte[]>(1);
        String inverseJoinKeyAsStr=PropertyAccessorHelper.getString(inverseKey);
        String redisKey=getHashKey(tableName,joinKeyAsStr + "String_Node_Str" + inverseJoinKeyAsStr);
        redisFields.put(getEncodedBytes(joinColumn),getEncodedBytes(joinKeyAsStr));
        redisFields.put(getEncodedBytes(inverseJoinColumn),getEncodedBytes(inverseJoinKeyAsStr));
        if (resource != null && resource.isActive()) {
          ((Transaction)connection).hmset(getEncodedBytes(redisKey),redisFields);
          ((Transaction)connection).zadd(getHashKey(tableName,inverseJoinKeyAsStr),getDouble(inverseJoinKeyAsStr),redisKey);
          ((Transaction)connection).zadd(getHashKey(tableName,joinKeyAsStr),getDouble(joinKeyAsStr),redisKey);
        }
 else {
          ((Jedis)connection).hmset(getEncodedBytes(redisKey),redisFields);
          ((Jedis)connection).zadd(getHashKey(tableName,inverseJoinKeyAsStr),getDouble(inverseJoinKeyAsStr),redisKey);
          ((Jedis)connection).zadd(getHashKey(tableName,joinKeyAsStr),getDouble(joinKeyAsStr),redisKey);
        }
        redisFields.clear();
      }
    }
  }
  finally {
    if (pipeline != null) {
      pipeline.sync();
    }
    onCleanup(connection);
  }
}

Fixed version (ground truth):
@Override public void persistJoinTable(JoinTableData joinTableData){
  String tableName=joinTableData.getJoinTableName();
  String inverseJoinColumn=joinTableData.getInverseJoinColumnName();
  String joinColumn=joinTableData.getJoinColumnName();
  Map<Object,Set<Object>> joinTableRecords=joinTableData.getJoinTableRecords();
  Object connection=null;
  Pipeline pipeline=null;
  try {
    connection=getConnection();
    if (isBoundTransaction()) {
      pipeline=((Jedis)connection).pipelined();
    }
    Set<Object> joinKeys=joinTableRecords.keySet();
    for (    Object joinKey : joinKeys) {
      String joinKeyAsStr=PropertyAccessorHelper.getString(joinKey);
      Set<Object> inverseKeys=joinTableRecords.get(joinKey);
      for (      Object inverseKey : inverseKeys) {
        Map<byte[],byte[]> redisFields=new HashMap<byte[],byte[]>(1);
        String inverseJoinKeyAsStr=PropertyAccessorHelper.getString(inverseKey);
        String redisKey=getHashKey(tableName,joinKeyAsStr + "String_Node_Str" + inverseJoinKeyAsStr);
        redisFields.put(getEncodedBytes(joinColumn),getEncodedBytes(joinKeyAsStr));
        redisFields.put(getEncodedBytes(inverseJoinColumn),getEncodedBytes(inverseJoinKeyAsStr));
        if (resource != null && resource.isActive()) {
          ((Transaction)connection).hmset(getEncodedBytes(redisKey),redisFields);
          ((Transaction)connection).zadd(getHashKey(tableName,inverseJoinKeyAsStr),getDouble(inverseJoinKeyAsStr),redisKey);
          ((Transaction)connection).zadd(getHashKey(tableName,joinKeyAsStr),getDouble(joinKeyAsStr),redisKey);
        }
 else {
          ((Jedis)connection).hmset(getEncodedBytes(redisKey),redisFields);
          ((Jedis)connection).zadd(getHashKey(tableName,inverseJoinKeyAsStr),getDouble(inverseJoinKeyAsStr),redisKey);
          ((Jedis)connection).zadd(getHashKey(tableName,joinKeyAsStr),getDouble(joinKeyAsStr),redisKey);
        }
        redisFields.clear();
      }
    }
  }
  finally {
    if (pipeline != null) {
      pipeline.sync();
    }
    onCleanup(connection);
  }
}