Program: 140790
Project: 140790
Buggy source:
/** 
 * DOC qzhang Comment method "installDND".
 */
public static void installDND(Tree targetControl){
  IWorkbenchPage activePage=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
  DQRespositoryView findView=(DQRespositoryView)activePage.findView(DQRespositoryView.ID);
  final CommonViewer commonViewer=findView.getCommonViewer();
  final LocalSelectionTransfer transfer=LocalSelectionTransfer.getTransfer();
  int operations=DND.DROP_COPY | DND.DROP_MOVE;
  Transfer[] transfers=new Transfer[]{transfer};
  DropTarget dropTarget=new DropTarget(targetControl,operations);
  dropTarget.setTransfer(transfers);
  dropTarget.addDropListener(new TreeDropTargetEffect(targetControl){
    @Override public void dragEnter(    DropTargetEvent event){
      super.dragEnter(event);
      event.feedback=DND.FEEDBACK_EXPAND;
      doDropValidation(event);
    }
    @Override public void dragOperationChanged(    DropTargetEvent event){
      super.dragOperationChanged(event);
      event.feedback=DND.FEEDBACK_EXPAND;
      doDropValidation(event);
    }
    @Override public void dragOver(    DropTargetEvent event){
      super.dragOver(event);
      doDropValidation(event);
    }
    @Override public void dropAccept(    DropTargetEvent event){
      super.dropAccept(event);
      doDropValidation(event);
    }
    @Override public void drop(    DropTargetEvent event){
      super.drop(event);
      IFile fe=(IFile)((StructuredSelection)commonViewer.getSelection()).getFirstElement();
      Pattern pattern=getPattern(fe);
      TreeItem item=(TreeItem)event.item;
      ColumnIndicator data=(ColumnIndicator)item.getData(AnalysisColumnTreeViewer.COLUMN_INDICATOR_KEY);
      PatternMatchingIndicator patternMatchingIndicator=IndicatorsFactory.eINSTANCE.createPatternMatchingIndicator();
      IndicatorParameters indicParams=IndicatorsFactory.eINSTANCE.createIndicatorParameters();
      Domain validData=DomainFactory.eINSTANCE.createDomain();
      validData.getPatterns().add(pattern);
      indicParams.setDataValidDomain(validData);
      patternMatchingIndicator.setParameters(indicParams);
      IndicatorEnum type=IndicatorEnum.findIndicatorEnum(patternMatchingIndicator.eClass());
      data.addIndicator(type,patternMatchingIndicator);
      IndicatorUnit indicatorUnit=new IndicatorUnit(type,patternMatchingIndicator,data);
      AnalysisColumnTreeViewer viewer=(AnalysisColumnTreeViewer)item.getData(AnalysisColumnTreeViewer.VIEWER_KEY);
      viewer.createOneUnit(item,indicatorUnit);
      viewer.setDirty(true);
    }
  }
);
}

Fixed version (ground truth):
/** 
 * DOC qzhang Comment method "installDND".
 */
public static void installDND(Tree targetControl){
  IWorkbenchPage activePage=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
  DQRespositoryView findView=(DQRespositoryView)activePage.findView(DQRespositoryView.ID);
  final CommonViewer commonViewer=findView.getCommonViewer();
  final LocalSelectionTransfer transfer=LocalSelectionTransfer.getTransfer();
  int operations=DND.DROP_COPY | DND.DROP_MOVE;
  Transfer[] transfers=new Transfer[]{transfer};
  DropTarget dropTarget=new DropTarget(targetControl,operations);
  dropTarget.setTransfer(transfers);
  dropTarget.addDropListener(new TreeDropTargetEffect(targetControl){
    @Override public void dragEnter(    DropTargetEvent event){
      super.dragEnter(event);
      event.feedback=DND.FEEDBACK_EXPAND;
      doDropValidation(event);
    }
    @Override public void dragOperationChanged(    DropTargetEvent event){
      super.dragOperationChanged(event);
      event.feedback=DND.FEEDBACK_EXPAND;
      doDropValidation(event);
    }
    @Override public void dragOver(    DropTargetEvent event){
      super.dragOver(event);
      doDropValidation(event);
    }
    @Override public void dropAccept(    DropTargetEvent event){
      super.dropAccept(event);
      doDropValidation(event);
    }
    @Override public void drop(    DropTargetEvent event){
      super.drop(event);
      IFile fe=(IFile)((StructuredSelection)commonViewer.getSelection()).getFirstElement();
      Pattern pattern=getPattern(fe);
      TreeItem item=(TreeItem)event.item;
      ColumnIndicator data=(ColumnIndicator)item.getData(AnalysisColumnTreeViewer.COLUMN_INDICATOR_KEY);
      PatternMatchingIndicator patternMatchingIndicator=IndicatorsFactory.eINSTANCE.createPatternMatchingIndicator();
      IndicatorParameters indicParams=IndicatorsFactory.eINSTANCE.createIndicatorParameters();
      Domain validData=DomainFactory.eINSTANCE.createDomain();
      validData.getPatterns().add(pattern);
      indicParams.setDataValidDomain(validData);
      patternMatchingIndicator.setParameters(indicParams);
      IndicatorEnum type=IndicatorEnum.findIndicatorEnum(patternMatchingIndicator.eClass());
      data.addIndicator(type,patternMatchingIndicator);
      AnalysisColumnTreeViewer viewer=(AnalysisColumnTreeViewer)item.getData(AnalysisColumnTreeViewer.VIEWER_KEY);
      viewer.createOneUnit(item,data.getIndicatorUnit(type));
      viewer.setDirty(true);
    }
  }
);
}