class BitextPatternRule extends BitextRule {

  private final AbstractPatternRule srcRule;
  private final AbstractPatternRule trgRule;
  
  BitextPatternRule(AbstractPatternRule src, AbstractPatternRule trg) {    
    srcRule = src;
    trgRule = trg;
  }
  
  public AbstractPatternRule getSrcRule() {
    return srcRule;        
  }
  
  public AbstractPatternRule getTrgRule() {
    return trgRule;
  }
  
  @Override
  public String getDescription() {
    return srcRule.getDescription();
  }

  @Override
  public String getMessage() {
    return trgRule.getMessage();
  }
  
  @Override
  public String getId() {
    return srcRule.getId();
  }

  /**
   * This method always returns an empty array.
   * Use {@link #match(org.languagetool.AnalyzedSentence, org.languagetool.AnalyzedSentence)} instead.
   */
  @Override
  public RuleMatch[] match(AnalyzedSentence sentence) throws IOException {
    return new RuleMatch[0];
  }

  @Override
  public RuleMatch[] match(AnalyzedSentence sourceSentence,
      AnalyzedSentence targetSentence) throws IOException {<FILL_FUNCTION_BODY>}

}

    if (srcRule.match(sourceSentence).length > 0)  {
      return trgRule.match(targetSentence);
    }
    return new RuleMatch[0];
  
<methods>public non-sealed void <init>() ,public final List<org.languagetool.bitext.StringPair> getCorrectBitextExamples() ,public final List<org.languagetool.rules.bitext.IncorrectBitextExample> getIncorrectBitextExamples() ,public abstract java.lang.String getMessage() ,public static List<Class<? extends org.languagetool.rules.bitext.BitextRule>> getRelevantRules() ,public final org.languagetool.Language getSourceLanguage() ,public abstract org.languagetool.rules.RuleMatch[] match(org.languagetool.AnalyzedSentence, org.languagetool.AnalyzedSentence) throws java.io.IOException,public org.languagetool.rules.RuleMatch[] match(org.languagetool.AnalyzedSentence) throws java.io.IOException,public final void setCorrectBitextExamples(List<org.languagetool.bitext.StringPair>) ,public final void setIncorrectBitextExamples(List<org.languagetool.rules.bitext.IncorrectBitextExample>) ,public final void setSourceLanguage(org.languagetool.Language) <variables>private List<org.languagetool.bitext.StringPair> correctExamples,private List<org.languagetool.rules.bitext.IncorrectBitextExample> incorrectExamples,private org.languagetool.Language sourceLanguage