A computer-implemented method includes receiving an artifact and a problem pattern, transforming the artifact into an abstracted artifact structure, and transforming the problem pattern into a query. The query is matched against the abstracted artifact structure. Any matched portions of the abstracted artifact structure are related back to corresponding result portions of the artifact. The corresponding result portions of the artifact are returned. The method may be embodied in a corresponding computer system or computer program product.