Source:
<code>private boolean matchVariant(String hugoSymbol, String variant, String example) { Gene gene = GeneUtils.getGeneByHugoSymbol(hugoSymbol); boolean isMatched = false; if (gene != null) { AlterationBo alterationBo = ApplicationContextSingleton.getAlterationBo(); boolean isGeneralAlteration = AlterationUtils.isGeneralAlterations(variant); Alteration oncokbVariant = new Alteration(); if (!isGeneralAlteration) { oncokbVariant.setGene(gene); oncokbVariant.setAlteration(variant); oncokbVariant.setName(variant); AlterationUtils.annotateAlteration(oncokbVariant, variant); } example = example.trim(); Alteration exampleVariant = new Alteration(); exampleVariant.setGene(gene); exampleVariant.setAlteration(example); exampleVariant.setName(example); AlterationUtils.annotateAlteration(exampleVariant, example); LinkedHashSet<Alteration> relevantAlterations = new LinkedHashSet<>(); if (isGeneralAlteration) { <START> relevantAlterations = alterationBo.findRelevantAlterations(exampleVariant, true); <END> for (Alteration alteration : relevantAlterations) { if (alteration.getAlteration().toLowerCase().equals(variant.toLowerCase())) { isMatched = true; break; } } } else { relevantAlterations = alterationBo.findRelevantAlterations(exampleVariant, Collections.singleton(oncokbVariant), false); isMatched = relevantAlterations.size() > 0; } } return isMatched; }</code><technical_language>If general mutation is specifically curated, returned relevant alteration list, mismatch. For example: utils/match/variant?hugoSymbol=EGFR&variant=Gain-of-function Mutations&examples=Amplification return {"Amplification": false}, is wrong Amplification is curated Gain-of-function</technical_language>

Target:
private boolean matchVariant(String hugoSymbol, String variant, String example) { Gene gene = GeneUtils.getGeneByHugoSymbol(hugoSymbol); boolean isMatched = false; if (gene != null) { AlterationBo alterationBo = ApplicationContextSingleton.getAlterationBo(); boolean isGeneralAlteration = AlterationUtils.isGeneralAlterations(variant); Alteration oncokbVariant = new Alteration(); oncokbVariant.setGene(gene); oncokbVariant.setAlteration(variant); oncokbVariant.setName(variant); AlterationUtils.annotateAlteration(oncokbVariant, variant); example = example.trim(); Alteration exampleVariant = new Alteration(); exampleVariant.setGene(gene); exampleVariant.setAlteration(example); exampleVariant.setName(example); AlterationUtils.annotateAlteration(exampleVariant, example); LinkedHashSet<Alteration> relevantAlterations = new LinkedHashSet<>(); if (isGeneralAlteration) { Set<Alteration> allAlterations = AlterationUtils.getAllAlterations(gene); Alteration exactMatch = AlterationUtils.findAlteration(gene, variant); if (exactMatch == null) { allAlterations.add(oncokbVariant); } relevantAlterations = alterationBo.findRelevantAlterations(exampleVariant, allAlterations, true); for (Alteration alteration : relevantAlterations) { if (alteration.getAlteration().toLowerCase().equals(variant.toLowerCase())) { isMatched = true; break; } } } else { relevantAlterations = alterationBo.findRelevantAlterations(exampleVariant, Collections.singleton(oncokbVariant), false); isMatched = relevantAlterations.size() > 0; } } return isMatched; }