':type metadata: Metadata'

def populate_confidence(self, metadata):

    for message in self.messages:
        if (message.confidence is None):
            message.confidence = calculate_confidence(message.path, message.line, metadata)
