Program: 121496
Project: 121496
Buggy source:
public PigExpressionComposite(TrayDialog expressionBuilderDialog,Composite parent,int style,IExpressionDataBean dataBean){
  super(parent,style);
  setLayout(new FillLayout());
  this.trayDialog=expressionBuilderDialog;
  final Group expressionGroup=new Group(this,SWT.NONE);
  GridLayout groupLayout=new GridLayout();
  expressionGroup.setLayout(groupLayout);
  expressionGroup.setText(Messages.getString("String_Node_Str"));
  final Composite upperOperationButtonBar=new Composite(expressionGroup,SWT.NONE);
  final GridLayout gridLayout=new GridLayout();
  gridLayout.horizontalSpacing=8;
  gridLayout.numColumns=3;
  gridLayout.marginTop=0;
  gridLayout.marginBottom=0;
  gridLayout.marginLeft=0;
  gridLayout.marginRight=0;
  gridLayout.marginWidth=0;
  gridLayout.marginHeight=0;
  upperOperationButtonBar.setLayout(gridLayout);
  upperOperationButtonBar.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.HORIZONTAL_ALIGN_END));
  upperOperationButtonBar.setData("String_Node_Str",null);
  final Button wrapButton=new Button(upperOperationButtonBar,SWT.CHECK);
  wrapButton.setText("String_Node_Str");
  wrapButton.setSelection(true);
  wrapButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      textControl.setWordWrap(wrapButton.getSelection());
    }
  }
);
  final Button undoButton=new Button(upperOperationButtonBar,SWT.NONE);
  undoButton.setText("String_Node_Str");
  undoButton.setEnabled(false);
  modificationRecord=new ExpressionRecorder(undoButton);
  undoButton.addMouseListener(new MouseAdapter(){
    @Override public void mouseDown(    MouseEvent e){
      undoOperation();
    }
  }
);
  final Button clearButton=new Button(upperOperationButtonBar,SWT.NONE);
  clearButton.setText(Messages.getString("String_Node_Str"));
  clearButton.addMouseListener(new MouseAdapter(){
    @Override public void mouseUp(    MouseEvent e){
      textControl.replaceTextRange(0,textControl.getCharCount(),"String_Node_Str");
    }
  }
);
  Composite composite=new Composite(expressionGroup,SWT.BORDER);
  composite.setLayoutData(new GridData(GridData.FILL_BOTH));
  GridLayout layout=new GridLayout();
  layout.marginBottom=0;
  layout.marginTop=0;
  layout.marginLeft=0;
  layout.marginRight=0;
  layout.marginHeight=0;
  layout.marginWidth=0;
  composite.setLayout(layout);
  textControl=new ColorStyledText(composite,SWT.BORDER | SWT.MULTI | SWT.WRAP| SWT.V_SCROLL,CorePlugin.getDefault().getPreferenceStore(),LanguageManager.getCurrentLanguage().getName());
  textControl.setWordWrap(wrapButton.getSelection());
  textControl.setLayoutData(new GridData(GridData.FILL_BOTH));
  textControl.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    ModifyEvent e){
      String content=getExpression();
      modificationRecord.pushRecored(content);
      Point cursorPos=textControl.getSelection();
      modificationRecord.setCursorPosition(cursorPos);
    }
  }
);
  createEditorProposal();
  DropTarget target=new DropTarget(textControl,DND.DROP_DEFAULT | DND.DROP_COPY);
  target.setTransfer(new Transfer[]{textTransfer});
  target.addDropListener(new DropTargetListener(){
    @Override public void dragEnter(    DropTargetEvent event){
      if (event.detail == DND.DROP_DEFAULT) {
        event.detail=DND.DROP_COPY;
      }
    }
    @Override public void dragOver(    DropTargetEvent event){
    }
    @Override public void dragOperationChanged(    DropTargetEvent event){
      if (event.detail == DND.DROP_DEFAULT) {
        event.detail=DND.DROP_COPY;
      }
    }
    @Override public void dragLeave(    DropTargetEvent event){
    }
    @Override public void dropAccept(    DropTargetEvent event){
    }
    @Override public void drop(    DropTargetEvent event){
      if (textTransfer.isSupportedType(event.currentDataType)) {
        String str=(String)event.data;
        ExpressionComposite expressionComposite=PigExpressionBuilderDialog.getExpressionComposite();
        if (str != null && str.endsWith("String_Node_Str") && !str.startsWith(JavaUtils.JAVA_PIGUDF_DIRECTORY + "String_Node_Str")) {
          expressionComposite.setExpression(str.substring(str.indexOf("String_Node_Str") + 1),true);
        }
 else {
          expressionComposite.setExpression(str,true);
        }
      }
    }
  }
);
}

Fixed version (ground truth):
public PigExpressionComposite(TrayDialog expressionBuilderDialog,Composite parent,int style,IExpressionDataBean dataBean){
  super(parent,style);
  setLayout(new FillLayout());
  this.trayDialog=expressionBuilderDialog;
  this.dataBean=dataBean;
  final Group expressionGroup=new Group(this,SWT.NONE);
  GridLayout groupLayout=new GridLayout();
  expressionGroup.setLayout(groupLayout);
  expressionGroup.setText(Messages.getString("String_Node_Str"));
  final Composite upperOperationButtonBar=new Composite(expressionGroup,SWT.NONE);
  final GridLayout gridLayout=new GridLayout();
  gridLayout.horizontalSpacing=8;
  gridLayout.numColumns=3;
  gridLayout.marginTop=0;
  gridLayout.marginBottom=0;
  gridLayout.marginLeft=0;
  gridLayout.marginRight=0;
  gridLayout.marginWidth=0;
  gridLayout.marginHeight=0;
  upperOperationButtonBar.setLayout(gridLayout);
  upperOperationButtonBar.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.HORIZONTAL_ALIGN_END));
  upperOperationButtonBar.setData("String_Node_Str",null);
  final Button wrapButton=new Button(upperOperationButtonBar,SWT.CHECK);
  wrapButton.setText("String_Node_Str");
  wrapButton.setSelection(true);
  wrapButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      textControl.setWordWrap(wrapButton.getSelection());
    }
  }
);
  final Button undoButton=new Button(upperOperationButtonBar,SWT.NONE);
  undoButton.setText("String_Node_Str");
  undoButton.setEnabled(false);
  modificationRecord=new ExpressionRecorder(undoButton);
  undoButton.addMouseListener(new MouseAdapter(){
    @Override public void mouseDown(    MouseEvent e){
      undoOperation();
    }
  }
);
  final Button clearButton=new Button(upperOperationButtonBar,SWT.NONE);
  clearButton.setText(Messages.getString("String_Node_Str"));
  clearButton.addMouseListener(new MouseAdapter(){
    @Override public void mouseUp(    MouseEvent e){
      textControl.replaceTextRange(0,textControl.getCharCount(),"String_Node_Str");
    }
  }
);
  Composite composite=new Composite(expressionGroup,SWT.BORDER);
  composite.setLayoutData(new GridData(GridData.FILL_BOTH));
  GridLayout layout=new GridLayout();
  layout.marginBottom=0;
  layout.marginTop=0;
  layout.marginLeft=0;
  layout.marginRight=0;
  layout.marginHeight=0;
  layout.marginWidth=0;
  composite.setLayout(layout);
  textControl=new ColorStyledText(composite,SWT.BORDER | SWT.MULTI | SWT.WRAP| SWT.V_SCROLL,CorePlugin.getDefault().getPreferenceStore(),LanguageManager.getCurrentLanguage().getName());
  textControl.setWordWrap(wrapButton.getSelection());
  textControl.setLayoutData(new GridData(GridData.FILL_BOTH));
  textControl.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    ModifyEvent e){
      String content=getExpression();
      modificationRecord.pushRecored(content);
      Point cursorPos=textControl.getSelection();
      modificationRecord.setCursorPosition(cursorPos);
    }
  }
);
  createEditorProposal();
  DropTarget target=new DropTarget(textControl,DND.DROP_DEFAULT | DND.DROP_COPY);
  target.setTransfer(new Transfer[]{textTransfer});
  target.addDropListener(new DropTargetListener(){
    @Override public void dragEnter(    DropTargetEvent event){
      if (event.detail == DND.DROP_DEFAULT) {
        event.detail=DND.DROP_COPY;
      }
    }
    @Override public void dragOver(    DropTargetEvent event){
    }
    @Override public void dragOperationChanged(    DropTargetEvent event){
      if (event.detail == DND.DROP_DEFAULT) {
        event.detail=DND.DROP_COPY;
      }
    }
    @Override public void dragLeave(    DropTargetEvent event){
    }
    @Override public void dropAccept(    DropTargetEvent event){
    }
    @Override public void drop(    DropTargetEvent event){
      if (textTransfer.isSupportedType(event.currentDataType)) {
        String str=(String)event.data;
        ExpressionComposite expressionComposite=PigExpressionBuilderDialog.getExpressionComposite();
        if (str != null && str.endsWith("String_Node_Str") && !str.startsWith(JavaUtils.JAVA_PIGUDF_DIRECTORY + "String_Node_Str")) {
          expressionComposite.setExpression(str.substring(str.indexOf("String_Node_Str") + 1),true);
        }
 else {
          expressionComposite.setExpression(str,true);
        }
      }
    }
  }
);
}