Program: 17447
Project: 17447
Buggy source:
/** 
 * get all the damager and repairers for the source type
 */
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer){
  PresentationReconciler reconciler=new PresentationReconciler();
  DefaultDamagerRepairer dr=new DefaultDamagerRepairer(getHTMTagScanner());
  reconciler.setDamager(dr,CFPartitionScanner.HTM_END_TAG);
  reconciler.setRepairer(dr,CFPartitionScanner.HTM_END_TAG);
  reconciler.setDamager(dr,CFPartitionScanner.HTM_START_TAG_BEGIN);
  reconciler.setRepairer(dr,CFPartitionScanner.HTM_START_TAG_BEGIN);
  reconciler.setDamager(dr,CFPartitionScanner.HTM_START_TAG_END);
  reconciler.setRepairer(dr,CFPartitionScanner.HTM_START_TAG_END);
  reconciler.setDamager(dr,CFPartitionScanner.HTM_TAG_ATTRIBS);
  reconciler.setRepairer(dr,CFPartitionScanner.HTM_TAG_ATTRIBS);
  dr=new DefaultDamagerRepairer(getScriptScanner());
  reconciler.setDamager(dr,CFPartitionScanner.J_SCRIPT);
  reconciler.setRepairer(dr,CFPartitionScanner.J_SCRIPT);
  dr=new DefaultDamagerRepairer(getStyleScanner());
  reconciler.setDamager(dr,CFPartitionScanner.CSS);
  reconciler.setRepairer(dr,CFPartitionScanner.CSS);
  dr=new DefaultDamagerRepairer(getSQLScanner());
  reconciler.setDamager(dr,CFPartitionScanner.SQL);
  reconciler.setRepairer(dr,CFPartitionScanner.SQL);
  dr=new DefaultDamagerRepairer(getCFScriptScanner());
  reconciler.setDamager(dr,CFPartitionScanner.CF_SCRIPT);
  reconciler.setRepairer(dr,CFPartitionScanner.CF_SCRIPT);
  reconciler.setDamager(dr,CFPartitionScanner.CF_SET_STATEMENT);
  reconciler.setRepairer(dr,CFPartitionScanner.CF_SET_STATEMENT);
  reconciler.setDamager(dr,CFPartitionScanner.CF_BOOLEAN_STATEMENT);
  reconciler.setRepairer(dr,CFPartitionScanner.CF_BOOLEAN_STATEMENT);
  reconciler.setDamager(dr,CFPartitionScanner.CF_RETURN_STATEMENT);
  reconciler.setRepairer(dr,CFPartitionScanner.CF_RETURN_STATEMENT);
  dr=new DefaultDamagerRepairer(getCFTagScanner());
  reconciler.setDamager(dr,CFPartitionScanner.CF_START_TAG_BEGIN);
  reconciler.setRepairer(dr,CFPartitionScanner.CF_START_TAG_BEGIN);
  reconciler.setDamager(dr,CFPartitionScanner.CF_START_TAG_END);
  reconciler.setRepairer(dr,CFPartitionScanner.CF_START_TAG_END);
  reconciler.setDamager(dr,CFPartitionScanner.CF_TAG_ATTRIBS);
  reconciler.setRepairer(dr,CFPartitionScanner.CF_TAG_ATTRIBS);
  reconciler.setDamager(dr,CFPartitionScanner.CF_END_TAG);
  reconciler.setRepairer(dr,CFPartitionScanner.CF_END_TAG);
  dr=new DefaultDamagerRepairer(getFormScanner());
  reconciler.setDamager(dr,CFPartitionScanner.FORM_END_TAG);
  reconciler.setRepairer(dr,CFPartitionScanner.FORM_END_TAG);
  reconciler.setDamager(dr,CFPartitionScanner.FORM_START_TAG_BEGIN);
  reconciler.setRepairer(dr,CFPartitionScanner.FORM_START_TAG_BEGIN);
  reconciler.setDamager(dr,CFPartitionScanner.FORM_START_TAG_END);
  reconciler.setRepairer(dr,CFPartitionScanner.FORM_START_TAG_END);
  dr=new DefaultDamagerRepairer(getTableScanner());
  reconciler.setDamager(dr,CFPartitionScanner.TABLE_END_TAG);
  reconciler.setRepairer(dr,CFPartitionScanner.TABLE_END_TAG);
  reconciler.setDamager(dr,CFPartitionScanner.TABLE_START_TAG_BEGIN);
  reconciler.setRepairer(dr,CFPartitionScanner.TABLE_START_TAG_BEGIN);
  reconciler.setDamager(dr,CFPartitionScanner.TABLE_START_TAG_END);
  reconciler.setRepairer(dr,CFPartitionScanner.TABLE_START_TAG_END);
  dr=new DefaultDamagerRepairer(getTextScanner());
  reconciler.setDamager(dr,IDocument.DEFAULT_CONTENT_TYPE);
  reconciler.setRepairer(dr,IDocument.DEFAULT_CONTENT_TYPE);
  dr=new DefaultDamagerRepairer(getUNKTagScanner());
  reconciler.setDamager(dr,CFPartitionScanner.UNK_TAG);
  reconciler.setRepairer(dr,CFPartitionScanner.UNK_TAG);
  NonRuleBasedDamagerRepairer ndr=new NonRuleBasedDamagerRepairer(new TextAttribute(colorManager.getColor(preferenceManager.getColor(CFMLColorsPreferenceConstants.P_COLOR_CFCOMMENT))));
  reconciler.setDamager(ndr,CFPartitionScanner.CF_COMMENT);
  reconciler.setRepairer(ndr,CFPartitionScanner.CF_COMMENT);
  NonRuleBasedDamagerRepairer ndr2=new NonRuleBasedDamagerRepairer(new TextAttribute(colorManager.getColor(preferenceManager.getColor(HTMLColorsPreferenceConstants.P_COLOR_HTM_COMMENT))));
  reconciler.setDamager(ndr2,CFPartitionScanner.HTM_COMMENT);
  reconciler.setRepairer(ndr2,CFPartitionScanner.HTM_COMMENT);
  NonRuleBasedDamagerRepairer ndr3=new NonRuleBasedDamagerRepairer(new TextAttribute(colorManager.getColor(preferenceManager.getColor(HTMLColorsPreferenceConstants.P_COLOR_HTM_COMMENT))));
  reconciler.setDamager(ndr3,CFPartitionScanner.DOCTYPE);
  reconciler.setRepairer(ndr3,CFPartitionScanner.DOCTYPE);
  return reconciler;
}

Fixed version (ground truth):
/** 
 * get all the damager and repairers for the source type
 */
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer){
  PresentationReconciler reconciler=new PresentationReconciler();
  DefaultDamagerRepairer dr=new DefaultDamagerRepairer(getHTMTagScanner());
  reconciler.setDamager(dr,CFPartitionScanner.HTM_END_TAG);
  reconciler.setRepairer(dr,CFPartitionScanner.HTM_END_TAG);
  reconciler.setDamager(dr,CFPartitionScanner.HTM_START_TAG_BEGIN);
  reconciler.setRepairer(dr,CFPartitionScanner.HTM_START_TAG_BEGIN);
  reconciler.setDamager(dr,CFPartitionScanner.HTM_START_TAG_END);
  reconciler.setRepairer(dr,CFPartitionScanner.HTM_START_TAG_END);
  reconciler.setDamager(dr,CFPartitionScanner.HTM_TAG_ATTRIBS);
  reconciler.setRepairer(dr,CFPartitionScanner.HTM_TAG_ATTRIBS);
  dr=new DefaultDamagerRepairer(getScriptScanner());
  reconciler.setDamager(dr,CFPartitionScanner.J_SCRIPT);
  reconciler.setRepairer(dr,CFPartitionScanner.J_SCRIPT);
  dr=new DefaultDamagerRepairer(getStyleScanner());
  reconciler.setDamager(dr,CFPartitionScanner.CSS);
  reconciler.setRepairer(dr,CFPartitionScanner.CSS);
  dr=new DefaultDamagerRepairer(getSQLScanner());
  reconciler.setDamager(dr,CFPartitionScanner.SQL);
  reconciler.setRepairer(dr,CFPartitionScanner.SQL);
  dr=new DefaultDamagerRepairer(getCFScriptScanner());
  reconciler.setDamager(dr,CFPartitionScanner.CF_SCRIPT);
  reconciler.setRepairer(dr,CFPartitionScanner.CF_SCRIPT);
  reconciler.setDamager(dr,CFPartitionScanner.CF_SET_STATEMENT);
  reconciler.setRepairer(dr,CFPartitionScanner.CF_SET_STATEMENT);
  reconciler.setDamager(dr,CFPartitionScanner.CF_BOOLEAN_STATEMENT);
  reconciler.setRepairer(dr,CFPartitionScanner.CF_BOOLEAN_STATEMENT);
  reconciler.setDamager(dr,CFPartitionScanner.CF_RETURN_STATEMENT);
  reconciler.setRepairer(dr,CFPartitionScanner.CF_RETURN_STATEMENT);
  dr=new DefaultDamagerRepairer(getCFTagScanner());
  reconciler.setDamager(dr,CFPartitionScanner.CF_START_TAG_BEGIN);
  reconciler.setRepairer(dr,CFPartitionScanner.CF_START_TAG_BEGIN);
  reconciler.setDamager(dr,CFPartitionScanner.CF_START_TAG_END);
  reconciler.setRepairer(dr,CFPartitionScanner.CF_START_TAG_END);
  reconciler.setDamager(dr,CFPartitionScanner.CF_TAG_ATTRIBS);
  reconciler.setRepairer(dr,CFPartitionScanner.CF_TAG_ATTRIBS);
  reconciler.setDamager(dr,CFPartitionScanner.CF_END_TAG);
  reconciler.setRepairer(dr,CFPartitionScanner.CF_END_TAG);
  dr=new DefaultDamagerRepairer(getFormScanner());
  reconciler.setDamager(dr,CFPartitionScanner.FORM_END_TAG);
  reconciler.setRepairer(dr,CFPartitionScanner.FORM_END_TAG);
  reconciler.setDamager(dr,CFPartitionScanner.FORM_START_TAG_BEGIN);
  reconciler.setRepairer(dr,CFPartitionScanner.FORM_START_TAG_BEGIN);
  reconciler.setDamager(dr,CFPartitionScanner.FORM_START_TAG_END);
  reconciler.setRepairer(dr,CFPartitionScanner.FORM_START_TAG_END);
  reconciler.setDamager(dr,CFPartitionScanner.FORM_TAG_ATTRIBS);
  reconciler.setRepairer(dr,CFPartitionScanner.FORM_TAG_ATTRIBS);
  dr=new DefaultDamagerRepairer(getTableScanner());
  reconciler.setDamager(dr,CFPartitionScanner.TABLE_END_TAG);
  reconciler.setRepairer(dr,CFPartitionScanner.TABLE_END_TAG);
  reconciler.setDamager(dr,CFPartitionScanner.TABLE_START_TAG_BEGIN);
  reconciler.setRepairer(dr,CFPartitionScanner.TABLE_START_TAG_BEGIN);
  reconciler.setDamager(dr,CFPartitionScanner.TABLE_START_TAG_END);
  reconciler.setRepairer(dr,CFPartitionScanner.TABLE_START_TAG_END);
  reconciler.setDamager(dr,CFPartitionScanner.TABLE_TAG_ATTRIBS);
  reconciler.setRepairer(dr,CFPartitionScanner.TABLE_TAG_ATTRIBS);
  dr=new DefaultDamagerRepairer(getTextScanner());
  reconciler.setDamager(dr,IDocument.DEFAULT_CONTENT_TYPE);
  reconciler.setRepairer(dr,IDocument.DEFAULT_CONTENT_TYPE);
  dr=new DefaultDamagerRepairer(getUNKTagScanner());
  reconciler.setDamager(dr,CFPartitionScanner.UNK_TAG);
  reconciler.setRepairer(dr,CFPartitionScanner.UNK_TAG);
  NonRuleBasedDamagerRepairer ndr=new NonRuleBasedDamagerRepairer(new TextAttribute(colorManager.getColor(preferenceManager.getColor(CFMLColorsPreferenceConstants.P_COLOR_CFCOMMENT))));
  reconciler.setDamager(ndr,CFPartitionScanner.CF_COMMENT);
  reconciler.setRepairer(ndr,CFPartitionScanner.CF_COMMENT);
  NonRuleBasedDamagerRepairer ndr2=new NonRuleBasedDamagerRepairer(new TextAttribute(colorManager.getColor(preferenceManager.getColor(HTMLColorsPreferenceConstants.P_COLOR_HTM_COMMENT))));
  reconciler.setDamager(ndr2,CFPartitionScanner.HTM_COMMENT);
  reconciler.setRepairer(ndr2,CFPartitionScanner.HTM_COMMENT);
  NonRuleBasedDamagerRepairer ndr3=new NonRuleBasedDamagerRepairer(new TextAttribute(colorManager.getColor(preferenceManager.getColor(HTMLColorsPreferenceConstants.P_COLOR_HTM_COMMENT))));
  reconciler.setDamager(ndr3,CFPartitionScanner.DOCTYPE);
  reconciler.setRepairer(ndr3,CFPartitionScanner.DOCTYPE);
  return reconciler;
}