The first link you cite gives what I might call a complete picture:
>Higher habitual coffee consumption was associated with higher insulin sensitivity (1) and a lower risk for type 2 diabetes (2–6) in diverse populations. In contrast, short-term metabolic studies showed that caffeine intake can acutely lower insulin sensitivity (7–9) and increase glucose concentrations (10–15). Randomized intervention studies are needed to examine whether tolerance to these acute effects develops after longer-term consumption (16). We therefore examined the effects of coffee and caffeine on fasting blood concentrations of glucose and insulin over 2–4 weeks in two crossover studies in healthy volunteers.
So caffeine causes a problem, but something in coffee, possibly not caffeine itself ( http://ajcn.nutrition.org/content/84/4/682.short ), has a long-term protective effect. Weight control doesn't seem to explain everything: coffee has a protective effect even when consumption is associated with higher BMI ( http://www.sciencedirect.com/science/article/pii/S0140673602... ). In the latter study: "Higher coffee consumption was associated with male sex, a low educational level, a higher body-mass index, cigarette smoking, alcohol use, less leisure time physical activity, and a generally less favourable diet" -- these are not things I would expect to be good for diabetes prevention! Yet the coffee consumers got less diabetes.
Chlorogenic acid, rather than caffeine, seems a likely culprit. Other antioxidants in coffee may play a role.