nus-yam/ex-repair huggingface dataset:
Program: 121956
Project: 121956
Buggy source:
private String getParameterValueWithContext(IElement elem,String key,IContext context){
  if (elem == null || key == null)   return "String_Node_Str";
  String actualKey=this.getParaNameFromRepositoryName(key);
  if (actualKey != null) {
    return fetchElementParameterValue(elem,context,actualKey);
  }
 else {
    return fetchElementParameterValue(elem,context,key);
  }
}

Fixed version (ground truth):
private String getParameterValueWithContext(IElement elem,String key,IContext context){
  if (elem == null || key == null) {
    return "String_Node_Str";
  }
  String actualKey=this.getParaNameFromRepositoryName(key);
  if (actualKey != null) {
    return fetchElementParameterValue(elem,context,actualKey);
  }
 else {
    return fetchElementParameterValue(elem,context,key);
  }
}
Program: 121957
Project: 121957
Buggy source:
public void dragLeave(final DropTargetEvent event){
}

Fixed version (ground truth):
@Override public void dragLeave(final DropTargetEvent event){
}
Program: 121958
Project: 121958
Buggy source:
public void drop(final DropTargetEvent event){
  if (propertyName != null) {
    String text;
    if (textControl instanceof StyledText) {
      text=((StyledText)textControl).getText() + (String)event.data;
      ((StyledText)textControl).setText(text);
    }
 else {
      text=((Text)textControl).getText() + (String)event.data;
      ((Text)textControl).setText(text);
    }
    Command cmd=new PropertyChangeCommand(elem,propertyName,text);
    executeCommand(cmd);
  }
}

Fixed version (ground truth):
@Override public void drop(final DropTargetEvent event){
  if (propertyName != null) {
    String text;
    if (textControl instanceof StyledText) {
      text=((StyledText)textControl).getText() + (String)event.data;
      ((StyledText)textControl).setText(text);
    }
 else {
      text=((Text)textControl).getText() + (String)event.data;
      ((Text)textControl).setText(text);
    }
    Command cmd=new PropertyChangeCommand(elem,propertyName,text);
    executeCommand(cmd);
  }
}
Program: 121959
Project: 121959
Buggy source:
public void dropAccept(final DropTargetEvent event){
}

Fixed version (ground truth):
@Override public void dropAccept(final DropTargetEvent event){
}
Program: 121961
Project: 121961
Buggy source:
public void proposalAccepted(IContentProposal proposal){
  if (control instanceof Text) {
    ContextParameterExtractor.saveContext(parameterName,elem,((Text)control).getText(),process);
  }
 else   if (control instanceof StyledText) {
    ContextParameterExtractor.saveContext(parameterName,elem,((StyledText)control).getText(),process);
  }
}

Fixed version (ground truth):
@Override public void proposalAccepted(IContentProposal proposal){
  if (control instanceof Text) {
    ContextParameterExtractor.saveContext(parameterName,elem,((Text)control).getText(),process);
  }
 else   if (control instanceof StyledText) {
    ContextParameterExtractor.saveContext(parameterName,elem,((StyledText)control).getText(),process);
  }
}
Program: 121962
Project: 121962
Buggy source:
public void keyReleased(KeyEvent e){
}

Fixed version (ground truth):
@Override public void keyReleased(KeyEvent e){
}
Program: 121963
Project: 121963
Buggy source:
/** 
 * cli Comment method "addResourceDisposeListener". When dispose the control, dispose resource at the same time. (bug 6916)
 */
protected void addResourceDisposeListener(final Control parent,final Resource res){
  if (parent != null) {
    parent.addDisposeListener(new DisposeListener(){
      public void widgetDisposed(      DisposeEvent e){
        if (res != null && !res.isDisposed()) {
          res.dispose();
        }
        parent.removeDisposeListener(this);
      }
    }
);
  }
}

Fixed version (ground truth):
/** 
 * cli Comment method "addResourceDisposeListener". When dispose the control, dispose resource at the same time. (bug 6916)
 */
protected void addResourceDisposeListener(final Control parent,final Resource res){
  if (parent != null) {
    parent.addDisposeListener(new DisposeListener(){
      @Override public void widgetDisposed(      DisposeEvent e){
        if (res != null && !res.isDisposed()) {
          res.dispose();
        }
        parent.removeDisposeListener(this);
      }
    }
);
  }
}
Program: 121964
Project: 121964
Buggy source:
private void refreshDynamicProperty(){
  if (this.dynamicProperty == null)   return;
  dynamicProperty.refresh();
}

Fixed version (ground truth):
private void refreshDynamicProperty(){
  if (this.dynamicProperty == null) {
    return;
  }
  dynamicProperty.refresh();
}
Program: 121965
Project: 121965
Buggy source:
public void dragOperationChanged(final DropTargetEvent event){
}

Fixed version (ground truth):
@Override public void dragOperationChanged(final DropTargetEvent event){
}
Program: 121966
Project: 121966
Buggy source:
public void dragOver(final DropTargetEvent event){
  if (TextTransfer.getInstance().isSupportedType(event.currentDataType)) {
    propertyName=getParameterName(textControl);
    for (int i=0; i < elem.getElementParameters().size(); i++) {
      IElementParameter param=elem.getElementParameters().get(i);
      if (param.getName().equals(propertyName)) {
        if (param.isReadOnly()) {
          event.detail=DND.ERROR_INVALID_DATA;
        }
      }
    }
  }
}

Fixed version (ground truth):
@Override public void dragOver(final DropTargetEvent event){
  if (TextTransfer.getInstance().isSupportedType(event.currentDataType)) {
    propertyName=getParameterName(textControl);
    for (int i=0; i < elem.getElementParameters().size(); i++) {
      IElementParameter param=elem.getElementParameters().get(i);
      if (param.getName().equals(propertyName)) {
        if (param.isReadOnly()) {
          event.detail=DND.ERROR_INVALID_DATA;
        }
      }
    }
  }
}
Program: 121970
Project: 121970
Buggy source:
@Override public void mousePressed(MouseEvent me){
  OutputTreeNode outputTreeNode=(OutputTreeNode)treeNode;
  List<TreeNode> loopNodes=new ArrayList<TreeNode>();
  if (inputMainTable != null && inputMainTable.isMultiLoops()) {
    loopNodes.addAll(XmlMapUtil.getMultiLoopsForInputTree(inputMainTable));
  }
  InputLoopNodesTable inputLoopNodesTable=null;
  if (outputTreeNode.getInputLoopNodesTable() != null) {
    inputLoopNodesTable=outputTreeNode.getInputLoopNodesTable();
  }
 else {
    inputLoopNodesTable=XmlmapFactory.eINSTANCE.createInputLoopNodesTable();
    outputTreeNode.setInputLoopNodesTable(inputLoopNodesTable);
    AbstractInOutTree abstractInOutTree=XmlMapUtil.getAbstractInOutTree(outputTreeNode);
    if (abstractInOutTree != null) {
      ((OutputXmlTree)abstractInOutTree).getInputLoopNodesTables().add(inputLoopNodesTable);
    }
  }
  SetLoopFunctionDialog nsDialog=new SetLoopFunctionDialog(null,outputTreeNode.getInputLoopNodesTable(),loopNodes);
  if (nsDialog.open() == Window.OK) {
    ((XmlMapGraphicViewer)treeNodePart.getViewer()).getMapperManager().getProblemsAnalyser().checkProblems(XmlMapUtil.getAbstractInOutTree(outputTreeNode));
    ((XmlMapGraphicViewer)treeNodePart.getViewer()).getMapperManager().getMapperUI().updateStatusBar();
  }
}

Fixed version (ground truth):
@Override public void mousePressed(MouseEvent me){
  OutputTreeNode outputTreeNode=(OutputTreeNode)treeNode;
  List<TreeNode> loopNodes=new ArrayList<TreeNode>();
  if (inputMainTable != null && inputMainTable.isMultiLoops()) {
    loopNodes.addAll(XmlMapUtil.getMultiLoopsForXmlTree(inputMainTable));
  }
  InputLoopNodesTable inputLoopNodesTable=null;
  if (outputTreeNode.getInputLoopNodesTable() != null) {
    inputLoopNodesTable=outputTreeNode.getInputLoopNodesTable();
  }
 else {
    inputLoopNodesTable=XmlmapFactory.eINSTANCE.createInputLoopNodesTable();
    outputTreeNode.setInputLoopNodesTable(inputLoopNodesTable);
    AbstractInOutTree abstractInOutTree=XmlMapUtil.getAbstractInOutTree(outputTreeNode);
    if (abstractInOutTree != null) {
      ((OutputXmlTree)abstractInOutTree).getInputLoopNodesTables().add(inputLoopNodesTable);
    }
  }
  SetLoopFunctionDialog nsDialog=new SetLoopFunctionDialog(null,outputTreeNode.getInputLoopNodesTable(),loopNodes);
  if (nsDialog.open() == Window.OK) {
    ((XmlMapGraphicViewer)treeNodePart.getViewer()).getMapperManager().getProblemsAnalyser().checkProblems(XmlMapUtil.getAbstractInOutTree(outputTreeNode));
    ((XmlMapGraphicViewer)treeNodePart.getViewer()).getMapperManager().getMapperUI().updateStatusBar();
  }
}
Program: 121975
Project: 121975
Buggy source:
@Override public void connectionStatusChanged(EConnectionType newValue,String connectionToApply){
  XmlMapData externalEmfData=(XmlMapData)getExternalEmfData();
  InputXmlTree mainTable=null;
  for (  InputXmlTree inputTree : externalEmfData.getInputTrees()) {
    if (inputTree.getName() != null && inputTree.getName().equals(connectionToApply)) {
      boolean value=EConnectionType.FLOW_MAIN != newValue;
      inputTree.setLookup(value);
      if (!value) {
        mainTable=inputTree;
      }
    }
 else     if (EConnectionType.FLOW_MAIN == newValue) {
      inputTree.setLookup(true);
    }
  }
  if (mainTable != null) {
    externalEmfData.getInputTrees().remove(mainTable);
    externalEmfData.getInputTrees().add(0,mainTable);
  }
}

Fixed version (ground truth):
@Override public void connectionStatusChanged(EConnectionType newValue,String connectionToApply){
  XmlMapData externalEmfData=(XmlMapData)getExternalEmfData();
  InputXmlTree mainTable=null;
  InputXmlTree oldmainTable=null;
  for (  InputXmlTree inputTree : externalEmfData.getInputTrees()) {
    if (!inputTree.isLookup()) {
      oldmainTable=inputTree;
      break;
    }
  }
  for (  InputXmlTree inputTree : externalEmfData.getInputTrees()) {
    if (inputTree.getName() != null && inputTree.getName().equals(connectionToApply)) {
      boolean value=EConnectionType.FLOW_MAIN != newValue;
      inputTree.setLookup(value);
      if (!value) {
        mainTable=inputTree;
      }
    }
 else     if (EConnectionType.FLOW_MAIN == newValue) {
      inputTree.setLookup(true);
    }
  }
  if (mainTable != null) {
    externalEmfData.getInputTrees().remove(mainTable);
    externalEmfData.getInputTrees().add(0,mainTable);
  }
  if (oldmainTable != null && oldmainTable != mainTable) {
    boolean checkMultiLoopsStatus=XmlMapUtil.checkMultiLoopsStatus(oldmainTable);
    if (checkMultiLoopsStatus) {
      MessageDialog.openInformation(null,"String_Node_Str","String_Node_Str");
      XmlMapUtil.removeloopInOutputTree(externalEmfData,mainTable,new ArrayList<TreeNode>());
      for (      TreeNode treeNode : oldmainTable.getNodes()) {
        if (XmlMapUtil.DOCUMENT.equals(treeNode.getType())) {
          List<TreeNode> oldLoops=new ArrayList<TreeNode>();
          XmlMapUtil.getChildLoops(oldLoops,treeNode.getChildren());
          if (oldLoops.size() > 1) {
            for (int i=1; i < oldLoops.size(); i++) {
              oldLoops.get(i).setLoop(false);
            }
          }
        }
      }
      oldmainTable.setMultiLoops(false);
    }
  }
  initMapperMain();
  mapperMain.getMapperManager().getProblemsAnalyser().checkProblems();
}
Program: 121976
Project: 121976
Buggy source:
@Override public void removeInput(IConnection connection){
  XmlMapData externalEmfData=(XmlMapData)getExternalEmfData();
  InputXmlTree toRemove=null;
  for (  InputXmlTree inputTree : externalEmfData.getInputTrees()) {
    if (inputTree.getName() != null && inputTree.getName().equals(connection.getUniqueName())) {
      toRemove=inputTree;
      break;
    }
  }
  if (toRemove != null) {
    if (!toRemove.isLookup() && toRemove.isMultiLoops()) {
      EList<OutputXmlTree> outputTrees=externalEmfData.getOutputTrees();
      for (      OutputXmlTree outputTree : outputTrees) {
        outputTree.getInputLoopNodesTables().clear();
      }
    }
    for (    TreeNode treeNode : toRemove.getNodes()) {
      XmlMapUtil.detachNodeConnections(treeNode,externalEmfData,true);
    }
    XmlMapUtil.detachFilterSource(toRemove,externalEmfData);
    externalEmfData.getInputTrees().remove(toRemove);
  }
}

Fixed version (ground truth):
@Override public void removeInput(IConnection connection){
  XmlMapData externalEmfData=(XmlMapData)getExternalEmfData();
  InputXmlTree toRemove=null;
  for (  InputXmlTree inputTree : externalEmfData.getInputTrees()) {
    if (inputTree.getName() != null && inputTree.getName().equals(connection.getUniqueName())) {
      toRemove=inputTree;
      break;
    }
  }
  if (toRemove != null) {
    if (!toRemove.isLookup() && toRemove.isMultiLoops()) {
      XmlMapUtil.removeloopInOutputTree(externalEmfData,null,null);
    }
    for (    TreeNode treeNode : toRemove.getNodes()) {
      XmlMapUtil.detachNodeConnections(treeNode,externalEmfData,true);
    }
    XmlMapUtil.detachFilterSource(toRemove,externalEmfData);
    externalEmfData.getInputTrees().remove(toRemove);
  }
}
Program: 121981
Project: 121981
Buggy source:
public static boolean checkMultiLoopsStatus(AbstractInOutTree tree){
  List<? extends TreeNode> children=new ArrayList<TreeNode>();
  if (tree instanceof InputXmlTree) {
    children=((InputXmlTree)tree).getNodes();
  }
 else   if (tree instanceof OutputXmlTree) {
    children=((OutputXmlTree)tree).getNodes();
  }
  List<TreeNode> docChildren=new ArrayList<TreeNode>();
  for (  TreeNode child : children) {
    if (DOCUMENT.equals(child.getType())) {
      docChildren.add(child);
    }
  }
  List<TreeNode> loopNodes=new ArrayList<TreeNode>();
  for (  TreeNode doc : docChildren) {
    getChildLoops(loopNodes,doc.getChildren(),false);
    if (loopNodes.size() > 1) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
public static boolean checkMultiLoopsStatus(AbstractInOutTree tree){
  List<? extends TreeNode> children=new ArrayList<TreeNode>();
  if (tree instanceof InputXmlTree) {
    children=((InputXmlTree)tree).getNodes();
  }
 else   if (tree instanceof OutputXmlTree) {
    children=((OutputXmlTree)tree).getNodes();
  }
  List<TreeNode> docChildren=new ArrayList<TreeNode>();
  for (  TreeNode child : children) {
    if (DOCUMENT.equals(child.getType())) {
      docChildren.add(child);
    }
  }
  List<TreeNode> loopNodes=new ArrayList<TreeNode>();
  for (  TreeNode doc : docChildren) {
    getChildLoops(loopNodes,doc.getChildren());
    if (loopNodes.size() > 1) {
      return true;
    }
  }
  return false;
}
Program: 121982
Project: 121982
Buggy source:
public static void removeloopInOutputTree(XmlMapData mapData,InputXmlTree mainInput,List<TreeNode> oldLoops){
  boolean isMainInputMultiLoop=mainInput == null ? false : mainInput.isMultiLoops();
  EList<OutputXmlTree> outputTrees=mapData.getOutputTrees();
  for (  OutputXmlTree outputTree : outputTrees) {
    if (isMainInputMultiLoop) {
      for (      TreeNode oldLoop : oldLoops) {
        EList<InputLoopNodesTable> inputLoopNodesTables=outputTree.getInputLoopNodesTables();
        for (        InputLoopNodesTable inputLoopTable : inputLoopNodesTables) {
          inputLoopTable.getInputloopnodes().remove(oldLoop);
        }
      }
    }
 else {
      outputTree.getInputLoopNodesTables().clear();
    }
  }
}

Fixed version (ground truth):
public static void removeloopInOutputTree(XmlMapData mapData,InputXmlTree mainInput,List<TreeNode> oldLoopsFromInput){
  removeloopInOutputTree(mapData,mainInput,oldLoopsFromInput,false);
}
Program: 121983
Project: 121983
Buggy source:
public static void getChildLoops(List<TreeNode> loopNodes,List<? extends TreeNode> nodesToCheck,boolean addRoot,boolean onlyGetFirstLoop){
  if (onlyGetFirstLoop) {
    if (!loopNodes.isEmpty()) {
      return;
    }
  }
  for (  TreeNode node : nodesToCheck) {
    if (node.isLoop()) {
      loopNodes.add(node);
    }
 else {
      if (addRoot) {
        if (node.eContainer() != null && node.eContainer().eContainer() instanceof AbstractInOutTree) {
          loopNodes.add(node);
        }
      }
      if (!node.getChildren().isEmpty()) {
        getChildLoops(loopNodes,node.getChildren(),onlyGetFirstLoop);
      }
    }
  }
}

Fixed version (ground truth):
public static void getChildLoops(List<TreeNode> loopNodes,List<? extends TreeNode> nodesToCheck,boolean addRoot,boolean onlyGetFirstLoop){
  if (onlyGetFirstLoop) {
    if (!loopNodes.isEmpty()) {
      return;
    }
  }
  for (  TreeNode node : nodesToCheck) {
    if (node.isLoop()) {
      loopNodes.add(node);
    }
 else {
      if (addRoot) {
        if (node.eContainer() != null && node.eContainer().eContainer() instanceof AbstractInOutTree) {
          loopNodes.add(node);
        }
      }
      if (!node.getChildren().isEmpty()) {
        getChildLoops(loopNodes,node.getChildren());
      }
    }
  }
}
Program: 121984
Project: 121984
Buggy source:
public static List<TreeNode> getMultiLoopsForXmlTree(AbstractInOutTree tree){
  List<TreeNode> loopNodes=new ArrayList<TreeNode>();
  List<? extends TreeNode> children=new ArrayList<TreeNode>();
  if (tree instanceof InputXmlTree) {
    children=((InputXmlTree)tree).getNodes();
  }
 else   if (tree instanceof OutputXmlTree) {
    children=((OutputXmlTree)tree).getNodes();
  }
  getChildLoops(loopNodes,children,false);
  return loopNodes;
}

Fixed version (ground truth):
public static List<TreeNode> getMultiLoopsForXmlTree(AbstractInOutTree tree){
  List<TreeNode> loopNodes=new ArrayList<TreeNode>();
  List<? extends TreeNode> children=new ArrayList<TreeNode>();
  if (tree instanceof InputXmlTree) {
    children=((InputXmlTree)tree).getNodes();
  }
 else   if (tree instanceof OutputXmlTree) {
    children=((OutputXmlTree)tree).getNodes();
  }
  getChildLoops(loopNodes,children);
  return loopNodes;
}
Program: 121986
Project: 121986
Buggy source:
public void renameInputConnection(String oldName,String newName){
  XmlMapData externalEmfData=(XmlMapData)getExternalEmfData();
  for (  InputXmlTree inputTree : externalEmfData.getInputTrees()) {
    if (inputTree.getName() != null && inputTree.getName().equals(oldName) && !oldName.equals(newName)) {
      inputTree.setName(newName);
      XmlMapUtil.updateXPathAndExpression(externalEmfData,expressionManager,inputTree.getNodes(),inputTree.getName(),1);
    }
  }
}

Fixed version (ground truth):
@Override public void renameInputConnection(String oldName,String newName){
  XmlMapData externalEmfData=(XmlMapData)getExternalEmfData();
  for (  InputXmlTree inputTree : externalEmfData.getInputTrees()) {
    if (inputTree.getName() != null && inputTree.getName().equals(oldName) && !oldName.equals(newName)) {
      inputTree.setName(newName);
      XmlMapUtil.updateXPathAndExpression(externalEmfData,expressionManager,inputTree.getNodes(),inputTree.getName(),1);
    }
  }
}
Program: 121987
Project: 121987
Buggy source:
public IExternalData getTMapExternalData(){
  return null;
}

Fixed version (ground truth):
@Override public IExternalData getTMapExternalData(){
  return null;
}
Program: 121988
Project: 121988
Buggy source:
public void setExternalData(IExternalData persistentData){
}

Fixed version (ground truth):
@Override public void setExternalData(IExternalData persistentData){
}
Program: 121989
Project: 121989
Buggy source:
public List<Problem> getProblems(){
  initMapperMain();
  return mapperMain.getMapperManager().getProblemsAnalyser().getProblems();
}

Fixed version (ground truth):
@Override public List<Problem> getProblems(){
  initMapperMain();
  return mapperMain.getMapperManager().getProblemsAnalyser().getProblems();
}
Program: 121990
Project: 121990
Buggy source:
public IComponentDocumentation getComponentDocumentation(String componentName,String tempFolderPath){
  return null;
}

Fixed version (ground truth):
@Override public IComponentDocumentation getComponentDocumentation(String componentName,String tempFolderPath){
  return null;
}
Program: 121992
Project: 121992
Buggy source:
@Override public void removeInput(IConnection connection){
  XmlMapData externalEmfData=(XmlMapData)getExternalEmfData();
  InputXmlTree toRemove=null;
  for (  InputXmlTree inputTree : externalEmfData.getInputTrees()) {
    if (inputTree.getName() != null && inputTree.getName().equals(connection.getUniqueName())) {
      toRemove=inputTree;
      break;
    }
  }
  if (toRemove != null) {
    for (    TreeNode treeNode : toRemove.getNodes()) {
      XmlMapUtil.detachNodeConnections(treeNode,externalEmfData,true);
    }
    XmlMapUtil.detachFilterSource(toRemove,externalEmfData);
    externalEmfData.getInputTrees().remove(toRemove);
  }
}

Fixed version (ground truth):
@Override public void removeInput(IConnection connection){
  XmlMapData externalEmfData=(XmlMapData)getExternalEmfData();
  InputXmlTree toRemove=null;
  for (  InputXmlTree inputTree : externalEmfData.getInputTrees()) {
    if (inputTree.getName() != null && inputTree.getName().equals(connection.getUniqueName())) {
      toRemove=inputTree;
      break;
    }
  }
  if (toRemove != null) {
    if (!toRemove.isLookup() && toRemove.isMultiLoops()) {
      EList<OutputXmlTree> outputTrees=externalEmfData.getOutputTrees();
      for (      OutputXmlTree outputTree : outputTrees) {
        outputTree.getInputLoopNodesTables().clear();
      }
    }
    for (    TreeNode treeNode : toRemove.getNodes()) {
      XmlMapUtil.detachNodeConnections(treeNode,externalEmfData,true);
    }
    XmlMapUtil.detachFilterSource(toRemove,externalEmfData);
    externalEmfData.getInputTrees().remove(toRemove);
  }
}
Program: 121993
Project: 121993
Buggy source:
public void setExternalEmfData(AbstractExternalData emfMapData){
  this.emfMapData=emfMapData;
}

Fixed version (ground truth):
@Override public void setExternalEmfData(AbstractExternalData emfMapData){
  this.emfMapData=emfMapData;
}
Program: 121994
Project: 121994
Buggy source:
public List<BlockCode> getBlocksCodeToClose(){
  if (generationManager == null) {
    throw new IllegalStateException();
  }
  return this.generationManager.getBlocksCodeToClose();
}

Fixed version (ground truth):
@Override public List<BlockCode> getBlocksCodeToClose(){
  if (generationManager == null) {
    throw new IllegalStateException();
  }
  return this.generationManager.getBlocksCodeToClose();
}
Program: 121996
Project: 121996
Buggy source:
@Override public void buildExternalData(AbstractExternalData abstractData){
  if (abstractData instanceof XmlMapData) {
    this.emfMapData=(XmlMapData)abstractData;
  }
}

Fixed version (ground truth):
@Override public void buildExternalData(AbstractExternalData abstractData){
  if (abstractData instanceof XmlMapData) {
    this.emfMapData=abstractData;
  }
}
Program: 121997
Project: 121997
Buggy source:
public AbstractExternalData getExternalEmfData(){
  if (this.emfMapData == null) {
    this.emfMapData=XmlmapFactory.eINSTANCE.createXmlMapData();
  }
  return this.emfMapData;
}

Fixed version (ground truth):
@Override public AbstractExternalData getExternalEmfData(){
  if (this.emfMapData == null) {
    this.emfMapData=XmlmapFactory.eINSTANCE.createXmlMapData();
  }
  return this.emfMapData;
}
Program: 121998
Project: 121998
Buggy source:
public void initialize(){
}

Fixed version (ground truth):
@Override public void initialize(){
}
Program: 121999
Project: 121999
Buggy source:
public void renameOutputConnection(String oldName,String newName){
  XmlMapData externalEmfData=(XmlMapData)getExternalEmfData();
  for (  OutputXmlTree outputTree : externalEmfData.getOutputTrees()) {
    if (outputTree.getName() != null && outputTree.getName().equals(oldName) && !oldName.equals(newName)) {
      outputTree.setName(newName);
      XmlMapUtil.updateXPathAndExpression(externalEmfData,expressionManager,outputTree.getNodes(),outputTree.getName(),1);
    }
  }
}

Fixed version (ground truth):
@Override public void renameOutputConnection(String oldName,String newName){
  XmlMapData externalEmfData=(XmlMapData)getExternalEmfData();
  for (  OutputXmlTree outputTree : externalEmfData.getOutputTrees()) {
    if (outputTree.getName() != null && outputTree.getName().equals(oldName) && !oldName.equals(newName)) {
      outputTree.setName(newName);
      XmlMapUtil.updateXPathAndExpression(externalEmfData,expressionManager,outputTree.getNodes(),outputTree.getName(),1);
    }
  }
}
Program: 122000
Project: 122000
Buggy source:
public int open(Composite parent){
  return open(parent.getDisplay());
}

Fixed version (ground truth):
@Override public int open(Composite parent){
  return open(parent.getDisplay());
}
Program: 122003
Project: 122003
Buggy source:
public void renameInputConnection(String oldName,String newName){
  XmlMapData externalEmfData=(XmlMapData)getExternalEmfData();
  for (  InputXmlTree inputTree : externalEmfData.getInputTrees()) {
    if (inputTree.getName() != null && inputTree.getName().equals(oldName) && !oldName.equals(newName)) {
      inputTree.setName(newName);
      XmlMapUtil.updateXPathAndExpression(externalEmfData,expressionManager,inputTree.getNodes(),inputTree.getName(),1);
    }
  }
}

Fixed version (ground truth):
@Override public void renameInputConnection(String oldName,String newName){
  XmlMapData externalEmfData=(XmlMapData)getExternalEmfData();
  for (  InputXmlTree inputTree : externalEmfData.getInputTrees()) {
    if (inputTree.getName() != null && inputTree.getName().equals(oldName) && !oldName.equals(newName)) {
      inputTree.setName(newName);
      XmlMapUtil.updateXPathAndExpression(externalEmfData,expressionManager,inputTree.getNodes(),inputTree.getName(),1);
    }
  }
}
Program: 122004
Project: 122004
Buggy source:
public IExternalData getTMapExternalData(){
  return null;
}

Fixed version (ground truth):
@Override public IExternalData getTMapExternalData(){
  return null;
}
Program: 122005
Project: 122005
Buggy source:
public void setExternalData(IExternalData persistentData){
}

Fixed version (ground truth):
@Override public void setExternalData(IExternalData persistentData){
}
Program: 122006
Project: 122006
Buggy source:
public List<Problem> getProblems(){
  initMapperMain();
  return mapperMain.getMapperManager().getProblemsAnalyser().getProblems();
}

Fixed version (ground truth):
@Override public List<Problem> getProblems(){
  initMapperMain();
  return mapperMain.getMapperManager().getProblemsAnalyser().getProblems();
}
Program: 122007
Project: 122007
Buggy source:
public IComponentDocumentation getComponentDocumentation(String componentName,String tempFolderPath){
  return null;
}

Fixed version (ground truth):
@Override public IComponentDocumentation getComponentDocumentation(String componentName,String tempFolderPath){
  return null;
}
Program: 122009
Project: 122009
Buggy source:
@Override public void removeInput(IConnection connection){
  XmlMapData externalEmfData=(XmlMapData)getExternalEmfData();
  InputXmlTree toRemove=null;
  for (  InputXmlTree inputTree : externalEmfData.getInputTrees()) {
    if (inputTree.getName() != null && inputTree.getName().equals(connection.getUniqueName())) {
      toRemove=inputTree;
      break;
    }
  }
  if (toRemove != null) {
    for (    TreeNode treeNode : toRemove.getNodes()) {
      XmlMapUtil.detachNodeConnections(treeNode,externalEmfData,true);
    }
    XmlMapUtil.detachFilterSource(toRemove,externalEmfData);
    externalEmfData.getInputTrees().remove(toRemove);
  }
}

Fixed version (ground truth):
@Override public void removeInput(IConnection connection){
  XmlMapData externalEmfData=(XmlMapData)getExternalEmfData();
  InputXmlTree toRemove=null;
  for (  InputXmlTree inputTree : externalEmfData.getInputTrees()) {
    if (inputTree.getName() != null && inputTree.getName().equals(connection.getUniqueName())) {
      toRemove=inputTree;
      break;
    }
  }
  if (toRemove != null) {
    if (!toRemove.isLookup() && toRemove.isMultiLoops()) {
      EList<OutputXmlTree> outputTrees=externalEmfData.getOutputTrees();
      for (      OutputXmlTree outputTree : outputTrees) {
        outputTree.getInputLoopNodesTables().clear();
      }
    }
    for (    TreeNode treeNode : toRemove.getNodes()) {
      XmlMapUtil.detachNodeConnections(treeNode,externalEmfData,true);
    }
    XmlMapUtil.detachFilterSource(toRemove,externalEmfData);
    externalEmfData.getInputTrees().remove(toRemove);
  }
}
Program: 122010
Project: 122010
Buggy source:
public void setExternalEmfData(AbstractExternalData emfMapData){
  this.emfMapData=emfMapData;
}

Fixed version (ground truth):
@Override public void setExternalEmfData(AbstractExternalData emfMapData){
  this.emfMapData=emfMapData;
}
Program: 122011
Project: 122011
Buggy source:
public List<BlockCode> getBlocksCodeToClose(){
  if (generationManager == null) {
    throw new IllegalStateException();
  }
  return this.generationManager.getBlocksCodeToClose();
}

Fixed version (ground truth):
@Override public List<BlockCode> getBlocksCodeToClose(){
  if (generationManager == null) {
    throw new IllegalStateException();
  }
  return this.generationManager.getBlocksCodeToClose();
}
Program: 122013
Project: 122013
Buggy source:
@Override public void buildExternalData(AbstractExternalData abstractData){
  if (abstractData instanceof XmlMapData) {
    this.emfMapData=(XmlMapData)abstractData;
  }
}

Fixed version (ground truth):
@Override public void buildExternalData(AbstractExternalData abstractData){
  if (abstractData instanceof XmlMapData) {
    this.emfMapData=abstractData;
  }
}
Program: 122014
Project: 122014
Buggy source:
public AbstractExternalData getExternalEmfData(){
  if (this.emfMapData == null) {
    this.emfMapData=XmlmapFactory.eINSTANCE.createXmlMapData();
  }
  return this.emfMapData;
}

Fixed version (ground truth):
@Override public AbstractExternalData getExternalEmfData(){
  if (this.emfMapData == null) {
    this.emfMapData=XmlmapFactory.eINSTANCE.createXmlMapData();
  }
  return this.emfMapData;
}
Program: 122015
Project: 122015
Buggy source:
public void initialize(){
}

Fixed version (ground truth):
@Override public void initialize(){
}
Program: 122016
Project: 122016
Buggy source:
public void renameOutputConnection(String oldName,String newName){
  XmlMapData externalEmfData=(XmlMapData)getExternalEmfData();
  for (  OutputXmlTree outputTree : externalEmfData.getOutputTrees()) {
    if (outputTree.getName() != null && outputTree.getName().equals(oldName) && !oldName.equals(newName)) {
      outputTree.setName(newName);
      XmlMapUtil.updateXPathAndExpression(externalEmfData,expressionManager,outputTree.getNodes(),outputTree.getName(),1);
    }
  }
}

Fixed version (ground truth):
@Override public void renameOutputConnection(String oldName,String newName){
  XmlMapData externalEmfData=(XmlMapData)getExternalEmfData();
  for (  OutputXmlTree outputTree : externalEmfData.getOutputTrees()) {
    if (outputTree.getName() != null && outputTree.getName().equals(oldName) && !oldName.equals(newName)) {
      outputTree.setName(newName);
      XmlMapUtil.updateXPathAndExpression(externalEmfData,expressionManager,outputTree.getNodes(),outputTree.getName(),1);
    }
  }
}
Program: 122017
Project: 122017
Buggy source:
public int open(Composite parent){
  return open(parent.getDisplay());
}

Fixed version (ground truth):
@Override public int open(Composite parent){
  return open(parent.getDisplay());
}
Program: 122020
Project: 122020
Buggy source:
@Override public void doSave(IProgressMonitor progressMonitor){
  if (repositoryEditorInput != null) {
    BusinessProcessItem businessProcessItem=(BusinessProcessItem)repositoryEditorInput.getItem();
    IRepositoryService service=CorePlugin.getDefault().getRepositoryService();
    IProxyRepositoryFactory repFactory=service.getProxyRepositoryFactory();
    try {
      repFactory.updateLockStatus();
      boolean locked=repFactory.getStatus(businessProcessItem) == ERepositoryStatus.LOCK_BY_USER;
      if (!locked) {
        repFactory.lock(businessProcessItem);
      }
    }
 catch (    Exception e) {
      ExceptionHandler.process(e);
    }
    ERepositoryStatus status=repFactory.getStatus(businessProcessItem);
    if (!status.equals(ERepositoryStatus.LOCK_BY_USER) && !repFactory.getRepositoryContext().isEditableAsReadOnly()) {
      MessageDialog.openWarning(getEditorSite().getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
      return;
    }
    super.doSave(progressMonitor);
    DiagramResourceManager diagramResourceManager=new DiagramResourceManager();
    diagramResourceManager.updateFromResource(businessProcessItem,repositoryEditorInput.getFile());
    try {
      ProxyRepositoryFactory.getInstance().save(businessProcessItem);
    }
 catch (    PersistenceException e) {
      ExceptionHandler.process(e);
    }
    propertyIsDirty=false;
    firePropertyChange(IEditorPart.PROP_DIRTY);
    RepositoryManager.refreshSavedNode(repositoryEditorInput.getRepositoryNode());
  }
}

Fixed version (ground truth):
@Override public void doSave(IProgressMonitor progressMonitor){
  if (repositoryEditorInput != null) {
    BusinessProcessItem businessProcessItem=(BusinessProcessItem)repositoryEditorInput.getItem();
    IRepositoryService service=CorePlugin.getDefault().getRepositoryService();
    IProxyRepositoryFactory repFactory=service.getProxyRepositoryFactory();
    try {
      repFactory.updateLockStatus();
      boolean locked=repFactory.getStatus(businessProcessItem) == ERepositoryStatus.LOCK_BY_USER;
      if (!locked) {
        repFactory.lock(businessProcessItem);
      }
    }
 catch (    Exception e) {
      ExceptionHandler.process(e);
    }
    ERepositoryStatus status=repFactory.getStatus(businessProcessItem);
    if (!status.equals(ERepositoryStatus.LOCK_BY_USER)) {
      MessageDialog.openWarning(getEditorSite().getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
      return;
    }
    super.doSave(progressMonitor);
    DiagramResourceManager diagramResourceManager=new DiagramResourceManager();
    diagramResourceManager.updateFromResource(businessProcessItem,repositoryEditorInput.getFile());
    try {
      ProxyRepositoryFactory.getInstance().save(businessProcessItem);
    }
 catch (    PersistenceException e) {
      ExceptionHandler.process(e);
    }
    propertyIsDirty=false;
    firePropertyChange(IEditorPart.PROP_DIRTY);
    RepositoryManager.refreshSavedNode(repositoryEditorInput.getRepositoryNode());
  }
}
Program: 122022
Project: 122022
Buggy source:
private void deployJarToDesForArchive(final ResourcesManager manager,Set<String> extRoutines){
  if (extRoutines.isEmpty()) {
    return;
  }
  IPath tmpDir=new Path(System.getProperty("String_Node_Str") + File.separatorChar + "String_Node_Str");
  File dirFile=tmpDir.toFile();
  for (Iterator<IPath> iterator=manager.getPaths().iterator(); iterator.hasNext(); ) {
    IPath path=iterator.next();
    String fileName=path.lastSegment();
    if (extRoutines.contains(fileName)) {
      try {
        InputStream is=manager.getStream(path);
        if (!dirFile.exists()) {
          dirFile.mkdirs();
        }
        File temFile=tmpDir.append(fileName).toFile();
        if (temFile.exists()) {
          temFile.delete();
        }
        byte[] b=new byte[1024];
        int length=0;
        BufferedOutputStream fos=new BufferedOutputStream(new FileOutputStream(temFile,true));
        while ((length=is.read(b)) != -1) {
          fos.write(b,0,length);
        }
        fos.close();
        CorePlugin.getDefault().getLibrariesService().deployLibrary(temFile.toURI().toURL());
        temFile.delete();
      }
 catch (      MalformedURLException e) {
        ExceptionHandler.process(e);
      }
catch (      IOException e) {
        ExceptionHandler.process(e);
      }
    }
  }
  dirFile.delete();
}

Fixed version (ground truth):
private void deployJarToDesForArchive(final ResourcesManager manager,Set<String> extRoutines){
  if (extRoutines.isEmpty()) {
    return;
  }
  IPath tmpDir=new Path(System.getProperty("String_Node_Str") + File.separatorChar + "String_Node_Str");
  File dirFile=tmpDir.toFile();
  for (  IPath path : manager.getPaths()) {
    String fileName=path.lastSegment();
    if (extRoutines.contains(fileName)) {
      try {
        InputStream is=manager.getStream(path);
        if (!dirFile.exists()) {
          dirFile.mkdirs();
        }
        File temFile=tmpDir.append(fileName).toFile();
        if (temFile.exists()) {
          temFile.delete();
        }
        byte[] b=new byte[1024];
        int length=0;
        BufferedOutputStream fos=new BufferedOutputStream(new FileOutputStream(temFile,true));
        while ((length=is.read(b)) != -1) {
          fos.write(b,0,length);
        }
        fos.close();
        CorePlugin.getDefault().getLibrariesService().deployLibrary(temFile.toURI().toURL());
        temFile.delete();
      }
 catch (      MalformedURLException e) {
        ExceptionHandler.process(e);
      }
catch (      IOException e) {
        ExceptionHandler.process(e);
      }
    }
  }
  dirFile.delete();
}
Program: 122024
Project: 122024
Buggy source:
@SuppressWarnings("String_Node_Str") private void deployJarToDes(final ResourcesManager manager,Set<String> extRoutines){
  File file=null;
  if (extRoutines.isEmpty()) {
    return;
  }
  for (Iterator iterator=manager.getPaths().iterator(); iterator.hasNext(); ) {
    String value=iterator.next().toString();
    file=new File(value);
    if (extRoutines.contains(file.getName())) {
      try {
        CorePlugin.getDefault().getLibrariesService().deployLibrary(file.toURL());
      }
 catch (      MalformedURLException e) {
        ExceptionHandler.process(e);
      }
catch (      IOException e) {
        ExceptionHandler.process(e);
      }
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void deployJarToDes(final ResourcesManager manager,Set<String> extRoutines){
  File file=null;
  if (extRoutines.isEmpty()) {
    return;
  }
  for (  Object element : manager.getPaths()) {
    String value=element.toString();
    file=new File(value);
    if (extRoutines.contains(file.getName())) {
      try {
        CorePlugin.getDefault().getLibrariesService().deployLibrary(file.toURL());
      }
 catch (      MalformedURLException e) {
        ExceptionHandler.process(e);
      }
catch (      IOException e) {
        ExceptionHandler.process(e);
      }
    }
  }
}
Program: 122032
Project: 122032
Buggy source:
@Override public void keyDown(org.eclipse.swt.events.KeyEvent keyEvent,EditPartViewer viewer){
  int keyCode=keyEvent.keyCode;
  if (keyEvent.stateMask == SWT.CTRL && (keyCode == SWT.ARROW_UP || keyCode == SWT.ARROW_DOWN || keyCode == SWT.ARROW_LEFT || keyCode == SWT.ARROW_RIGHT)) {
    List<EditPart> parts=viewer.getSelectedEditParts();
    if (parts == null) {
      return;
    }
    for (    EditPart part : parts) {
      if (part instanceof NodePart) {
        Node node=(Node)part.getModel();
        if (node != null) {
          moveShape(keyCode,node,moveOffset);
        }
      }
    }
    moveOffset++;
  }
 else {
    super.keyDown(keyEvent,viewer);
  }
}

Fixed version (ground truth):
@Override public void keyDown(org.eclipse.swt.events.KeyEvent keyEvent,EditPartViewer viewer){
  int keyCode=keyEvent.keyCode;
  if (selectedConnectionPart != null) {
    if (selectedConnectionPart != null) {
      CreateComponentOnLinkHelper.unselectConnection(selectedConnectionPart);
    }
    selectedConnectionPart=null;
  }
 else   if (keyEvent.stateMask == SWT.CTRL && (keyCode == SWT.ARROW_UP || keyCode == SWT.ARROW_DOWN || keyCode == SWT.ARROW_LEFT || keyCode == SWT.ARROW_RIGHT)) {
    List<EditPart> parts=viewer.getSelectedEditParts();
    if (parts == null) {
      return;
    }
    for (    EditPart part : parts) {
      if (part instanceof NodePart) {
        Node node=(Node)part.getModel();
        if (node != null) {
          moveShape(keyCode,node,moveOffset);
        }
      }
    }
    moveOffset++;
  }
 else {
    super.keyDown(keyEvent,viewer);
  }
}
Program: 122033
Project: 122033
Buggy source:
public static void selectConnection(Connection connection,SubjobContainerPart containerPart){
  List children=containerPart.getChildren();
  for (int i=0; i < children.size(); i++) {
    Object object=children.get(i);
    if (object instanceof NodeContainerPart) {
      NodeContainerPart nodeContainerPart=(NodeContainerPart)object;
      Object nodePart=nodeContainerPart.getChildren().get(0);
      if (nodePart instanceof NodePart) {
        List sourceConnections=((NodePart)nodePart).getSourceConnections();
        for (int j=0; j < sourceConnections.size(); j++) {
          Object connectionPart=sourceConnections.get(j);
          if (connectionPart instanceof ConnectionPart) {
            ConnectionPart connPart=(ConnectionPart)connectionPart;
            org.talend.designer.core.ui.editor.connections.Connection conn=(org.talend.designer.core.ui.editor.connections.Connection)connPart.getModel();
            if (conn.equals(connection)) {
              ConnectionFigure fig=(ConnectionFigure)connPart.getFigure();
              if (fig.getLineWidth() != 2) {
                fig.setLineWidth(2);
                connPart.refresh();
                setSelectedConnection(connection);
              }
            }
 else {
              ConnectionFigure fig=(ConnectionFigure)connPart.getFigure();
              if (fig.getLineWidth() != 1) {
                fig.setLineWidth(1);
                connPart.refresh();
              }
            }
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
public static void selectConnection(ConnectionPart connPart){
  ConnectionFigure fig=(ConnectionFigure)connPart.getFigure();
  if (fig.getLineWidth() != 2) {
    fig.setLineWidth(2);
    connPart.refresh();
  }
}
Program: 122034
Project: 122034
Buggy source:
public static void unselectAllConnections(SubjobContainerPart containerPart){
  setSelectedConnection(null);
  List children=((SubjobContainerPart)containerPart).getChildren();
  for (int i=0; i < children.size(); i++) {
    Object object=children.get(i);
    if (object instanceof NodeContainerPart) {
      NodeContainerPart nodeContainerPart=(NodeContainerPart)object;
      Object nodePart=nodeContainerPart.getChildren().get(0);
      if (nodePart instanceof NodePart) {
        List sourceConnections=((NodePart)nodePart).getSourceConnections();
        for (int j=0; j < sourceConnections.size(); j++) {
          Object connectionPart=sourceConnections.get(j);
          if (connectionPart instanceof ConnectionPart) {
            ConnectionPart connPart=(ConnectionPart)connectionPart;
            org.talend.designer.core.ui.editor.connections.Connection conn=(org.talend.designer.core.ui.editor.connections.Connection)connPart.getModel();
            ConnectionFigure fig=(ConnectionFigure)connPart.getFigure();
            if (fig.getLineWidth() != 1) {
              fig.setLineWidth(1);
              connPart.refresh();
            }
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
public static void unselectAllConnections(ProcessPart processPart){
  for (  Object child : processPart.getChildren()) {
    if (child instanceof SubjobContainerPart) {
      SubjobContainerPart subJobPart=(SubjobContainerPart)child;
      for (      Object sChilde : subJobPart.getChildren()) {
        if (sChilde instanceof NodeContainerPart) {
          NodeContainerPart nodeCPart=(NodeContainerPart)sChilde;
          for (          Object nChild : nodeCPart.getChildren()) {
            if (nChild instanceof NodePart) {
              for (              Object conn : ((NodePart)nChild).getTargetConnections()) {
                if (conn instanceof ConnectionPart) {
                  unselectConnection((ConnectionPart)conn);
                }
              }
            }
          }
        }
      }
    }
  }
}
Program: 122036
Project: 122036
Buggy source:
private void addGroupEscapeChar(final Composite mainComposite){
  Group group=Form.createGroup(mainComposite,3,Messages.getString("String_Node_Str"),100);
  csvRadio=new Button(group,SWT.RADIO);
  csvRadio.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      getConnection().setCsvOption(csvRadio.getSelection());
      if (csvRadio.getSelection()) {
        getConnection().setSplitRecord(false);
      }
    }
  }
);
  csvRadio.setText(Messages.getString("String_Node_Str"));
  delimitedRadio=new Button(group,SWT.RADIO);
  delimitedRadio.setText(Messages.getString("String_Node_Str"));
  GridData gridData=new GridData(SWT.FILL,SWT.BOTTOM,true,false);
  gridData.horizontalSpan=2;
  delimitedRadio.setLayoutData(gridData);
  getConnection().setCsvOption(false);
  delimitedRadio.setSelection(true);
  escapeCharCombo=new LabelledCombo(group,Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),ESCAPE_CHAR_DATA,1,false,SWT.READ_ONLY);
  escapeCharFlag=new Label(group,SWT.NONE);
  escapeCharFlag.setText("String_Node_Str");
  textEnclosureCombo=new LabelledCombo(group,Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),TEXT_ENCLOSURE_DATA,1,false,SWT.READ_ONLY);
  textEnclosureFlag=new Label(group,SWT.NONE);
  textEnclosureFlag.setText("String_Node_Str");
}

Fixed version (ground truth):
private void addGroupEscapeChar(final Composite mainComposite){
  Group group=Form.createGroup(mainComposite,3,Messages.getString("String_Node_Str"),100);
  csvRadio=new Button(group,SWT.RADIO);
  csvRadio.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      getConnection().setCsvOption(csvRadio.getSelection());
      if (csvRadio.getSelection()) {
        getConnection().setSplitRecord(false);
      }
    }
  }
);
  csvRadio.setText(Messages.getString("String_Node_Str"));
  delimitedRadio=new Button(group,SWT.RADIO);
  delimitedRadio.setText(Messages.getString("String_Node_Str"));
  GridData gridData=new GridData(SWT.FILL,SWT.BOTTOM,true,false);
  gridData.horizontalSpan=2;
  delimitedRadio.setLayoutData(gridData);
  getConnection().setCsvOption(false);
  delimitedRadio.setSelection(true);
  escapeCharCombo=new LabelledCombo(group,Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),ESCAPE_CHAR_DATA,1,false,SWT.READ_ONLY);
  escapeCharFlag=new Label(group,SWT.NONE);
  escapeCharFlag.setText("String_Node_Str");
  textEnclosureCombo=new LabelledCombo(group,Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),TEXT_ENCLOSURE_DATA,1,false,SWT.READ_ONLY);
  textEnclosureFlag=new Label(group,SWT.NONE);
  textEnclosureFlag.setText("String_Node_Str");
}
Program: 122038
Project: 122038
Buggy source:
private boolean checkKeyValue(String oldValue,String newValue){
  String errorMsg=null;
  boolean canModify=true;
  if (!Pattern.matches(SCHEMA_NAME_PATTERN,newValue)) {
    errorMsg="String_Node_Str" + newValue + "String_Node_Str";
  }
 else {
    final Object input=schemaTreeViewer.getInput();
    if (input instanceof SchemasKeyData) {
      List<String> list=new ArrayList<String>();
      final List<SchemasKeyData> children=((SchemasKeyData)input).getChildren();
      for (      SchemasKeyData schema : children) {
        final String name=schema.getUniqueRecord();
        if (!name.equals(oldValue)) {
          list.add(name);
        }
      }
      if (list.contains(newValue)) {
        errorMsg="String_Node_Str" + newValue + "String_Node_Str";
      }
    }
  }
  if (errorMsg != null) {
    MessageDialog.openError(schemaTreeViewer.getTree().getShell(),"String_Node_Str",errorMsg);
    canModify=false;
  }
  return canModify;
}

Fixed version (ground truth):
private boolean checkKeyValue(String oldValue,String newValue){
  String errorMsg=null;
  boolean canModify=true;
  if (!Pattern.matches(SCHEMA_NAME_PATTERN,newValue)) {
    errorMsg="String_Node_Str" + newValue + "String_Node_Str";
  }
 else {
    final Object input=schemaTreeViewer.getInput();
    if (input instanceof SchemasKeyData) {
      List<String> list=new ArrayList<String>();
      final List<SchemasKeyData> children=((SchemasKeyData)input).getChildren();
      for (      SchemasKeyData schema : children) {
        final String name=schema.getUniqueRecord();
        if (!name.equals(oldValue)) {
          list.add(name.toUpperCase());
        }
      }
      if (newValue != null && list.contains(newValue.toUpperCase())) {
        errorMsg="String_Node_Str" + newValue + "String_Node_Str";
      }
    }
  }
  if (errorMsg != null) {
    MessageDialog.openError(schemaTreeViewer.getTree().getShell(),"String_Node_Str",errorMsg);
    canModify=false;
  }
  return canModify;
}
Program: 122039
Project: 122039
Buggy source:
public void keyReleased(KeyEvent e){
}

Fixed version (ground truth):
@Override public void keyReleased(KeyEvent e){
}