nus-yam/ex-repair huggingface dataset:
Program: 118134
Project: 118134
Buggy source:
@Override public boolean close(){
  SqlBuilderPlugin.getDefault().getRepositoryService().removeRepositoryChangedListener(this);
  try {
    if (this.nodeInEditor != null) {
      RepositoryNode root=SQLBuilderRepositoryNodeManager.getRoot(this.nodeInEditor);
      if (root != null) {
        DatabaseConnection connection=(DatabaseConnection)((ConnectionItem)root.getObject().getProperty().getItem()).getConnection();
        shutDownDb(connection);
      }
    }
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
  clean();
  SQLBuilderRepositoryNodeManager.removeAllRepositoryNodes();
  return super.close();
}

Fixed version (ground truth):
@Override public boolean close(){
  try {
    SqlBuilderPlugin.getDefault().getRepositoryService().removeRepositoryChangedListener(this);
    if (this.nodeInEditor != null) {
      RepositoryNode root=SQLBuilderRepositoryNodeManager.getRoot(this.nodeInEditor);
      if (root != null) {
        DatabaseConnection connection=(DatabaseConnection)((ConnectionItem)root.getObject().getProperty().getItem()).getConnection();
        shutDownDb(connection);
      }
    }
    clean();
    SQLBuilderRepositoryNodeManager.removeAllRepositoryNodes();
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
 finally {
    super.close();
  }
  return true;
}
Program: 118135
Project: 118135
Buggy source:
/** 
 * Added by Tang Fengneng Sets the connParameters.
 * @param connParameters the connParameters to set
 */
public void setConnParameters(ConnectionParameters connParameters){
  this.connParameters=connParameters;
}

Fixed version (ground truth):
/** 
 * Added by Tang Fengneng Sets the connParameters.
 * @param connParameters the connParameters to set
 */
@Override public void setConnParameters(ConnectionParameters connParameters){
  this.connParameters=connParameters;
}
Program: 118136
Project: 118136
Buggy source:
public void setCanceled(boolean b){
  fIsCanceled=b;
  if (locked) {
    clearBlocked();
  }
}

Fixed version (ground truth):
@Override public void setCanceled(boolean b){
  fIsCanceled=b;
  if (locked) {
    clearBlocked();
  }
}
Program: 118137
Project: 118137
Buggy source:
public void widgetSelected(SelectionEvent event){
  buttonPressed(((Integer)event.widget.getData()).intValue());
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent event){
  buttonPressed(((Integer)event.widget.getData()).intValue());
}
Program: 118138
Project: 118138
Buggy source:
/** 
 * Create contents of the dialog.
 * @param parent
 */
protected Control createDialogArea(Composite parent){
  container=(Composite)super.createDialogArea(parent);
  final SashForm mainSashForm=new SashForm(container,SWT.NONE | SWT.VERTICAL);
  mainSashForm.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
  final SashForm sashFormStructureAndEditor=new SashForm(mainSashForm,SWT.NONE);
  final SashForm sashFormResultAndDetail=new SashForm(mainSashForm,SWT.NONE);
  mainSashForm.setWeights(new int[]{3,1});
  createResult(sashFormResultAndDetail);
  createDetail(sashFormResultAndDetail);
  sashFormResultAndDetail.setWeights(new int[]{4,3});
  createDatabaseStructure(sashFormStructureAndEditor);
  createSQLEditor(sashFormStructureAndEditor);
  sashFormStructureAndEditor.setWeights(new int[]{4,6});
  if (connParameters.isFromRepository() && connParameters.getQueryObject() != null) {
    structureComposite.openNewQueryEditor();
  }
 else   if (connParameters.isFromRepository() && connParameters.getMetadataTable() != null) {
    structureComposite.openNewTableEditor();
  }
 else {
    structureComposite.openNewEditor();
  }
  new RefreshDetailCompositeAction(structureComposite.getTreeViewer(),this.getShell());
  return container;
}

Fixed version (ground truth):
/** 
 * Create contents of the dialog.
 * @param parent
 */
@Override protected Control createDialogArea(Composite parent){
  container=(Composite)super.createDialogArea(parent);
  final SashForm mainSashForm=new SashForm(container,SWT.NONE | SWT.VERTICAL);
  mainSashForm.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
  final SashForm sashFormStructureAndEditor=new SashForm(mainSashForm,SWT.NONE);
  final SashForm sashFormResultAndDetail=new SashForm(mainSashForm,SWT.NONE);
  mainSashForm.setWeights(new int[]{3,1});
  createResult(sashFormResultAndDetail);
  createDetail(sashFormResultAndDetail);
  sashFormResultAndDetail.setWeights(new int[]{4,3});
  createDatabaseStructure(sashFormStructureAndEditor);
  createSQLEditor(sashFormStructureAndEditor);
  sashFormStructureAndEditor.setWeights(new int[]{4,6});
  if (connParameters.isFromRepository() && connParameters.getQueryObject() != null) {
    structureComposite.openNewQueryEditor();
  }
 else   if (connParameters.isFromRepository() && connParameters.getMetadataTable() != null) {
    structureComposite.openNewTableEditor();
  }
 else {
    structureComposite.openNewEditor();
  }
  new RefreshDetailCompositeAction(structureComposite.getTreeViewer(),this.getShell());
  return container;
}
Program: 118139
Project: 118139
Buggy source:
public void openEditor(RepositoryNode node,List<String> repositoryName,ConnectionParameters connParam,boolean isDefaultEditor,List<IRepositoryNode> nodeSel){
  this.nodeInEditor=node;
  editorComposite.setNodesSel(nodeSel);
  editorComposite.openNewEditor(node,repositoryName,connParam,isDefaultEditor);
}

Fixed version (ground truth):
@Override public void openEditor(RepositoryNode node,List<String> repositoryName,ConnectionParameters connParam,boolean isDefaultEditor,List<IRepositoryNode> nodeSel){
  this.nodeInEditor=node;
  editorComposite.setNodesSel(nodeSel);
  editorComposite.openNewEditor(node,repositoryName,connParam,isDefaultEditor);
}
Program: 118141
Project: 118141
Buggy source:
public void notifySQLBuilder(IRepositoryViewObject o){
  CorePlugin.getDefault().getRepositoryService().removeRepositoryChangedListener(this);
  CorePlugin.getDefault().getRepositoryService().repositoryChanged(new RepositoryElementDelta(o));
  CorePlugin.getDefault().getRepositoryService().registerRepositoryChangedListener(this);
}

Fixed version (ground truth):
@Override public void notifySQLBuilder(IRepositoryViewObject o){
  CorePlugin.getDefault().getRepositoryService().removeRepositoryChangedListener(this);
  CorePlugin.getDefault().getRepositoryService().repositoryChanged(new RepositoryElementDelta(o));
  CorePlugin.getDefault().getRepositoryService().registerRepositoryChangedListener(this);
}
Program: 118142
Project: 118142
Buggy source:
public void done(){
  if (progressIndicator == null) {
    return;
  }
  if (!progressIndicator.isDisposed()) {
    progressIndicator.sendRemainingWork();
    progressIndicator.done();
  }
}

Fixed version (ground truth):
@Override public void done(){
  if (progressIndicator == null) {
    return;
  }
  if (!progressIndicator.isDisposed()) {
    progressIndicator.sendRemainingWork();
    progressIndicator.done();
  }
}
Program: 118143
Project: 118143
Buggy source:
public void setTaskName(String name){
}

Fixed version (ground truth):
@Override public void setTaskName(String name){
}
Program: 118144
Project: 118144
Buggy source:
public void refreshNode(RepositoryNode node){
  structureComposite.doRefresh(node);
}

Fixed version (ground truth):
@Override public void refreshNode(RepositoryNode node){
  structureComposite.doRefresh(node);
}
Program: 118145
Project: 118145
Buggy source:
/** 
 * Create contents of the button bar.
 * @param parent
 */
protected void createButtonsForButtonBar(Composite parent){
  GridData data=new GridData(GridData.FILL_HORIZONTAL);
  parent.setLayoutData(data);
  GridLayout layout=(GridLayout)parent.getLayout();
  layout.makeColumnsEqualWidth=false;
  layout.numColumns=4;
  GridData gd=new GridData(GridData.FILL_HORIZONTAL);
  progressIndicator=new ProgressIndicator(parent);
  progressIndicator.setLayoutData(gd);
  gd=new GridData();
  gd.widthHint=200;
  Label l=new Label(parent,SWT.NONE);
  l.setLayoutData(gd);
  createButton(parent,IDialogConstants.OK_ID,IDialogConstants.OK_LABEL,false);
  createButton(parent,IDialogConstants.CANCEL_ID,IDialogConstants.CANCEL_LABEL,false);
}

Fixed version (ground truth):
/** 
 * Create contents of the button bar.
 * @param parent
 */
@Override protected void createButtonsForButtonBar(Composite parent){
  GridData data=new GridData(GridData.FILL_HORIZONTAL);
  parent.setLayoutData(data);
  GridLayout layout=(GridLayout)parent.getLayout();
  layout.makeColumnsEqualWidth=false;
  layout.numColumns=4;
  GridData gd=new GridData(GridData.FILL_HORIZONTAL);
  progressIndicator=new ProgressIndicator(parent);
  progressIndicator.setLayoutData(gd);
  gd=new GridData();
  gd.widthHint=200;
  Label l=new Label(parent,SWT.NONE);
  l.setLayoutData(gd);
  createButton(parent,IDialogConstants.OK_ID,IDialogConstants.OK_LABEL,false);
  createButton(parent,IDialogConstants.CANCEL_ID,IDialogConstants.CANCEL_LABEL,false);
}
Program: 118146
Project: 118146
Buggy source:
public String getSelectedContext(){
  return this.selectedContext;
}

Fixed version (ground truth):
@Override public String getSelectedContext(){
  return this.selectedContext;
}
Program: 118147
Project: 118147
Buggy source:
/** 
 * Return the initial size of the dialog.
 */
protected Point getInitialSize(){
  return new Point(800,600);
}

Fixed version (ground truth):
/** 
 * Return the initial size of the dialog.
 */
@Override protected Point getInitialSize(){
  return new Point(800,600);
}
Program: 118149
Project: 118149
Buggy source:
/** 
 * Returns the progress monitor to use for operations run in this progress dialog.
 * @return the progress monitor
 */
public IProgressMonitor getProgressMonitor(){
  return progressMonitor;
}

Fixed version (ground truth):
/** 
 * Returns the progress monitor to use for operations run in this progress dialog.
 * @return the progress monitor
 */
@Override public IProgressMonitor getProgressMonitor(){
  return progressMonitor;
}
Program: 118150
Project: 118150
Buggy source:
public void repositoryChanged(RepositoryChangedEvent event){
  clean();
  if (structureComposite != null) {
    structureComposite.updateStructureView(event);
  }
  manager.synchronizeAllSqlEditors(this);
}

Fixed version (ground truth):
@Override public void repositoryChanged(RepositoryChangedEvent event){
  clean();
  if (structureComposite != null) {
    structureComposite.updateStructureView(event);
  }
  manager.synchronizeAllSqlEditors(this);
}
Program: 118151
Project: 118151
Buggy source:
private static boolean checkNodeCircle(INode currentNode){
  List<INode> nodeList=new ArrayList<INode>();
  Set<INode> nodeSet=new HashSet<INode>();
  getAllSourceNode(currentNode,nodeList);
  for (  INode node : nodeList) {
    nodeSet.add(node);
  }
  return !(nodeSet.size() == nodeList.size());
}

Fixed version (ground truth):
private static boolean checkNodeCircle(INode currentNode){
  if (currentNode.getIncomingConnections().size() > 1) {
    List<INode> nodeList=new ArrayList<INode>();
    Set<INode> nodeSet=new HashSet<INode>();
    getAllSourceNode(currentNode,nodeList);
    for (    INode node : nodeList) {
      nodeSet.add(node);
    }
    return !(nodeSet.size() == nodeList.size());
  }
  return false;
}
Program: 118153
Project: 118153
Buggy source:
/** 
 * see feature 0003664: tRunJob: When opening the tree dialog to select the job target, it could be useful to open it on previous selected job if exists.
 * @param button
 * @param dialog
 */
private void selectJobNodeIfExists(Button button,RepositoryReviewDialog dialog){
  try {
    if (elem != null && elem instanceof Node) {
      Node runJobNode=(Node)elem;
      String paramName=(String)button.getData(PARAMETER_NAME);
      String jobId=(String)runJobNode.getPropertyValue(paramName);
      if (StringUtils.isNotEmpty(jobId)) {
        ProcessItem processItem=ItemCacheManager.getProcessItem(jobId);
        String jobName=processItem.getProperty().getLabel();
        dialog.setSelectedNodeName(jobName);
      }
    }
  }
 catch (  Throwable e) {
    ExceptionHandler.process(e);
  }
}

Fixed version (ground truth):
/** 
 * see feature 0003664: tRunJob: When opening the tree dialog to select the job target, it could be useful to open it on previous selected job if exists.
 * @param button
 * @param dialog
 */
private void selectJobNodeIfExists(Button button,RepositoryReviewDialog dialog){
  try {
    if (elem != null && elem instanceof Node) {
      Node runJobNode=(Node)elem;
      String paramName=(String)button.getData(PARAMETER_NAME);
      String jobId=(String)runJobNode.getPropertyValue(paramName);
      if (StringUtils.isNotEmpty(jobId)) {
        ProcessItem processItem=ItemCacheManager.getProcessItem(jobId);
        if (processItem != null) {
          String jobName=processItem.getProperty().getLabel();
          dialog.setSelectedNodeName(jobName);
        }
      }
    }
  }
 catch (  Throwable e) {
    ExceptionHandler.process(e);
  }
}
Program: 118154
Project: 118154
Buggy source:
/** 
 * yzhang Comment method "applySettingsToSubJob".
 * @param id
 * @param version
 */
private void applySettingsToSubJob(String id,String version){
  ProcessType processType=ItemCacheManager.getProcessItem(id,version).getProcess();
  EList<ElementParameterType> parameters=processType.getParameters().getElementParameter();
  StatsAndLogsViewHelper.applySettings(parameters,elem);
  List<NodeType> nodes=findRunJobNode(processType.getNode());
  for (  NodeType nodeType : nodes) {
    EList<ElementParameterType> list=nodeType.getElementParameter();
    ElementParameterType idParam=getElementParameterType(list,PROCESS + "String_Node_Str" + EParameterName.PROCESS_TYPE_PROCESS.getName());
    ElementParameterType versionParam=getElementParameterType(list,PROCESS + "String_Node_Str" + EParameterName.PROCESS_TYPE_VERSION.getName());
    String subId=idParam.getValue();
    String subVersion=versionParam.getValue();
    applySettingsToSubJob(subId,subVersion);
  }
}

Fixed version (ground truth):
/** 
 * yzhang Comment method "applySettingsToSubJob".
 * @param id
 * @param version
 */
private void applySettingsToSubJob(String id,String version){
  final ProcessItem processItem=ItemCacheManager.getProcessItem(id,version);
  if (processItem == null) {
    return;
  }
  ProcessType processType=processItem.getProcess();
  EList<ElementParameterType> parameters=processType.getParameters().getElementParameter();
  StatsAndLogsViewHelper.applySettings(parameters,elem);
  List<NodeType> nodes=findRunJobNode(processType.getNode());
  for (  NodeType nodeType : nodes) {
    EList<ElementParameterType> list=nodeType.getElementParameter();
    ElementParameterType idParam=getElementParameterType(list,PROCESS + "String_Node_Str" + EParameterName.PROCESS_TYPE_PROCESS.getName());
    ElementParameterType versionParam=getElementParameterType(list,PROCESS + "String_Node_Str" + EParameterName.PROCESS_TYPE_VERSION.getName());
    String subId=idParam.getValue();
    String subVersion=versionParam.getValue();
    applySettingsToSubJob(subId,subVersion);
  }
}
Program: 118156
Project: 118156
Buggy source:
/** 
 * qzhang Comment method "convert".
 * @param outputMetaTable2
 * @return TODO
 */
public void convert(RowGeneratorComponent externalNode,IMetadataTable outputMetaTable2,FunctionManagerExt functionManager){
  List<IMetadataColumn> exts=new ArrayList<IMetadataColumn>();
  for (int j=0; j < outputMetaTable2.getListColumns().size(); j++) {
    IMetadataColumn column=outputMetaTable2.getListColumns().get(j);
    if (column instanceof MetadataColumnExt) {
      exts.add(column.clone());
    }
 else     if (column instanceof MetadataColumn) {
      MetadataColumnExt ext=new MetadataColumnExt((MetadataColumn)column);
      List<Function> funs=functionManager.getFunctionsByType(ext.getTalendType());
      ext.setArrayFunctions(functionManager.getFunctionArrays(funs));
      if (!funs.isEmpty()) {
        ext.setFunction(functionManager.getFuntionFromArray(ext,externalNode,j));
      }
      exts.add(ext);
    }
  }
  outputMetaTable2.setListColumns(exts);
}

Fixed version (ground truth):
/** 
 * qzhang Comment method "convert".
 * @param outputMetaTable2
 * @return TODO
 */
public void convert(RowGeneratorComponent externalNode,IMetadataTable outputMetaTable2,FunctionManagerExt functionManager){
  List<IMetadataColumn> exts=new ArrayList<IMetadataColumn>();
  for (int j=0; j < outputMetaTable2.getListColumns().size(); j++) {
    IMetadataColumn column=outputMetaTable2.getListColumns().get(j);
    if (column instanceof MetadataColumnExt) {
      exts.add(column.clone());
    }
 else     if (column instanceof MetadataColumn) {
      MetadataColumnExt ext=new MetadataColumnExt((MetadataColumn)column);
      List<Function> funs=functionManager.getFunctionsByType(ext.getTalendType());
      ext.setArrayFunctions(functionManager.getFunctionArrays(funs));
      if (!funs.isEmpty()) {
        Function funtion=functionManager.getFunctionFromColumn(ext);
        if (funtion == null) {
          funtion=functionManager.getFuntionFromArray(ext,externalNode,j);
        }
        ext.setFunction(funtion);
      }
      exts.add(ext);
    }
  }
  outputMetaTable2.setListColumns(exts);
}
Program: 118157
Project: 118157
Buggy source:
public void setFunction(Function function){
  this.function=function;
}

Fixed version (ground truth):
public void setFunction(Function function){
  this.function=function;
  updateFunctionInfo();
}
Program: 118159
Project: 118159
Buggy source:
/** 
 * DOC wzhang Comment method "canSaveProperty".
 * @param param
 * @return
 */
private boolean canSaveProperty(IElementParameter param){
  INode node=(INode)param.getElement();
  String componentName=node.getComponent().getName();
  return RepositoryComponentManager.validComponent(componentName);
}

Fixed version (ground truth):
/** 
 * DOC wzhang Comment method "canSaveProperty".
 * @param param
 * @return
 */
private boolean canSaveProperty(IElementParameter param){
  INode node=(INode)param.getElement();
  String componentName=node.getComponent().getName();
  String repositoryValue=param.getRepositoryValue();
  boolean isHDFSRepVal=repositoryValue != null && repositoryValue.contains("String_Node_Str");
  return !isHDFSRepVal && RepositoryComponentManager.validComponent(componentName);
}
Program: 118160
Project: 118160
Buggy source:
@Override public ExecutionResult execute(Project project){
  try {
    URL p=MetadataTalendType.getProjectForderURLOfMappingsFile();
    changeSAPHanaMappingFile(p);
    URL s=MetadataTalendType.getSystemForderURLOfMappingsFile();
    changeSAPHanaMappingFile(s);
    if (GlobalServiceRegister.getDefault().isServiceRegistered(ICoreService.class)) {
      ICoreService service=(ICoreService)GlobalServiceRegister.getDefault().getService(ICoreService.class);
      service.synchronizeMapptingXML();
      return ExecutionResult.SUCCESS_NO_ALERT;
    }
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
  return ExecutionResult.FAILURE;
}

Fixed version (ground truth):
@Override public ExecutionResult execute(Project project){
  try {
    URL s=MetadataTalendType.getSystemForderURLOfMappingsFile();
    changeSAPHanaMappingFile(s);
    String dirPath="String_Node_Str" + MetadataTalendType.INTERNAL_MAPPINGS_FOLDER;
    IProject _project=ResourceUtils.getProject(project);
    File projectMappingFolder=new ProjectScope(_project).getLocation().append(dirPath).toFile();
    if (projectMappingFolder.exists()) {
      URL p=MetadataTalendType.getProjectForderURLOfMappingsFile();
      changeSAPHanaMappingFile(p);
      if (GlobalServiceRegister.getDefault().isServiceRegistered(ICoreService.class)) {
        ICoreService service=(ICoreService)GlobalServiceRegister.getDefault().getService(ICoreService.class);
        service.synchronizeMapptingXML();
      }
    }
    return ExecutionResult.SUCCESS_NO_ALERT;
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
    return ExecutionResult.FAILURE;
  }
}
Program: 118162
Project: 118162
Buggy source:
public static List<Map<String,Object>> getTableValues(Properties tableProperties,IElementParameter param){
  List<Map<String,Object>> table=new ArrayList<Map<String,Object>>();
  if (param.getListItemsDisplayCodeName().length == 0) {
    return table;
  }
  Property property=tableProperties.getValuedProperty(param.getListItemsDisplayCodeName()[0]);
  Object value=property.getValue();
  if (value instanceof List) {
    for (int i=0; i < ((List)value).size(); i++) {
      Map<String,Object> line=new HashMap<String,Object>();
      for (      String columnName : param.getListItemsDisplayCodeName()) {
        Property columnProperty=tableProperties.getValuedProperty(columnName);
        EParameterFieldType type=getTypeFromColumnName(param,columnName);
        Object columnValue=columnProperty.getValue();
        if (columnValue instanceof List) {
          List values=(List)columnValue;
          if (type.equals(EParameterFieldType.CHECK)) {
            Object o=values.get(i);
            if (o == null) {
              line.put(columnName,Boolean.FALSE);
            }
 else {
              line.put(columnName,new Boolean(o.toString()));
            }
          }
 else {
            line.put(columnName,values.get(i));
          }
        }
      }
      table.add(line);
    }
  }
  return table;
}

Fixed version (ground truth):
public static List<Map<String,Object>> getTableValues(Properties tableProperties,IElementParameter param){
  List<Map<String,Object>> table=new ArrayList<Map<String,Object>>();
  if (param.getListItemsDisplayCodeName().length == 0) {
    return table;
  }
  Property property=tableProperties.getValuedProperty(param.getListItemsDisplayCodeName()[0]);
  Object value=property.getValue();
  if (value instanceof List) {
    for (int i=0; i < ((List)value).size(); i++) {
      Map<String,Object> line=new HashMap<String,Object>();
      for (      String columnName : param.getListItemsDisplayCodeName()) {
        Property columnProperty=tableProperties.getValuedProperty(columnName);
        EParameterFieldType type=getTypeFromColumnName(param,columnName);
        Object columnValue=columnProperty.getValue();
        if (columnValue instanceof List) {
          List values=(List)columnValue;
          if (type.equals(EParameterFieldType.CHECK)) {
            if (values.size() > i) {
              Object o=values.get(i);
              if (o == null) {
                line.put(columnName,Boolean.FALSE);
              }
 else {
                line.put(columnName,new Boolean(o.toString()));
              }
            }
 else {
              line.put(columnName,Boolean.FALSE);
            }
          }
 else {
            line.put(columnName,values.get(i));
          }
        }
 else {
          if (type.equals(EParameterFieldType.CHECK)) {
            for (int j=0; j < ((List)value).size(); j++) {
              line.put(columnName,Boolean.FALSE);
            }
          }
        }
      }
      table.add(line);
    }
  }
  return table;
}
Program: 118163
Project: 118163
Buggy source:
private static String unescapeForJava(String input){
  CharSequenceTranslator UNESCAPE_JAVA=new AggregateTranslator(new OctalUnescaper(),new UnicodeUnescaper(),new LookupTranslator(new String[][]{{"String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str"}}));
  return UNESCAPE_JAVA.translate(input);
}

Fixed version (ground truth):
public static String unescapeForJava(String input){
  CharSequenceTranslator UNESCAPE_JAVA=new AggregateTranslator(new OctalUnescaper(),new UnicodeUnescaper(),new LookupTranslator(new String[][]{{"String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str"}}));
  return UNESCAPE_JAVA.translate(input);
}
Program: 118165
Project: 118165
Buggy source:
@Override public Composite creatDynamicComposite(Composite composite,Element element,EComponentCategory sectionCategory,boolean isCompactView){
  DynamicComposite dynamicComposite=null;
  if (element != null && element instanceof INode) {
    INode node=(INode)element;
    ComponentProperties props=null;
    if (node.getComponentProperties() == null) {
      props=ComponentsUtils.getComponentProperties(node.getComponent().getName());
    }
 else {
      props=node.getComponentProperties();
    }
    if (props != null) {
      Form form=props.getForm(EComponentCategory.ADVANCED.equals(sectionCategory) ? Form.ADVANCED : Form.MAIN);
      dynamicComposite=new DynamicComposite(composite,SWT.H_SCROLL | SWT.V_SCROLL | SWT.NO_FOCUS,sectionCategory,element,isCompactView,composite.getBackground(),form);
      List<ElementParameter> elementParameters=(List<ElementParameter>)node.getElementParameters();
      for (      ElementParameter parameter : elementParameters) {
        if (parameter instanceof GenericElementParameter) {
          GenericElementParameter genericElementParameter=(GenericElementParameter)parameter;
          genericElementParameter.callBeforePresent();
          genericElementParameter.removePropertyChangeListener(dynamicComposite);
          genericElementParameter.addPropertyChangeListener(dynamicComposite);
        }
      }
    }
  }
  return dynamicComposite;
}

Fixed version (ground truth):
@Override public Composite creatDynamicComposite(Composite composite,Element element,EComponentCategory sectionCategory,boolean isCompactView){
  DynamicComposite dynamicComposite=null;
  if (element != null && element instanceof INode) {
    INode node=(INode)element;
    ComponentProperties props=null;
    if (node.getComponentProperties() == null) {
      props=ComponentsUtils.getComponentProperties(node.getComponent().getName());
    }
 else {
      props=node.getComponentProperties();
    }
    if (props != null) {
      Form form=props.getForm(EComponentCategory.ADVANCED.equals(sectionCategory) ? Form.ADVANCED : Form.MAIN);
      dynamicComposite=new DynamicComposite(composite,SWT.H_SCROLL | SWT.V_SCROLL | SWT.NO_FOCUS,sectionCategory,element,isCompactView,form);
      List<ElementParameter> elementParameters=(List<ElementParameter>)node.getElementParameters();
      for (      ElementParameter parameter : elementParameters) {
        if (parameter instanceof GenericElementParameter) {
          GenericElementParameter genericElementParameter=(GenericElementParameter)parameter;
          genericElementParameter.callBeforePresent();
          genericElementParameter.removePropertyChangeListener(dynamicComposite);
          genericElementParameter.addPropertyChangeListener(dynamicComposite);
        }
      }
    }
  }
  return dynamicComposite;
}
Program: 118166
Project: 118166
Buggy source:
public ERepositoryObjectType getNewRepType(String oldRepTypeName){
  return RepTypeMappingManager.getInstance().getNewRepType(oldRepTypeName);
}

Fixed version (ground truth):
@Override public ERepositoryObjectType getNewRepType(String oldRepTypeName){
  return RepTypeMappingManager.getInstance().getNewRepType(oldRepTypeName);
}
Program: 118167
Project: 118167
Buggy source:
public DynamicComposite(Composite parentComposite,int styles,EComponentCategory section,Element element,boolean isCompactView,Color backgroundColor,Form form,boolean drivedByForm){
  super(parentComposite,styles,section,element,isCompactView,backgroundColor);
  this.element=element;
  this.form=form;
  this.drivedByForm=drivedByForm;
  checker=new Checker();
  internalService=new GenericWizardInternalService();
  if (drivedByForm) {
    internalService.getComponentService().makeFormCancelable(form.getProperties(),form.getName());
  }
  resetParameters();
}

Fixed version (ground truth):
public DynamicComposite(Composite parentComposite,int styles,EComponentCategory section,Element element,boolean isCompactView,Form form,boolean drivedByForm){
  super(parentComposite,styles,section,element,isCompactView);
  this.element=element;
  this.form=form;
  this.drivedByForm=drivedByForm;
  checker=new Checker();
  internalService=new GenericWizardInternalService();
  if (drivedByForm) {
    internalService.getComponentService().makeFormCancelable(form.getProperties(),form.getName());
  }
  resetParameters();
}
Program: 118168
Project: 118168
Buggy source:
@Override public void createControl(final Composite parent){
  Composite container=new Composite(parent,SWT.NONE);
  container.setLayoutData(new GridData(GridData.FILL_BOTH));
  container.setLayout(new FormLayout());
  setControl(container);
  Element element=new FakeElement(form.getName());
  element.setReadOnly(!isRepositoryObjectEditable);
  dynamicComposite=new DynamicComposite(container,SWT.H_SCROLL | SWT.V_SCROLL | SWT.NO_FOCUS,EComponentCategory.BASIC,element,true,container.getBackground(),form,false);
  dynamicComposite.setLayoutData(createMainFormData(addContextFields));
  dynamicComposite.setConnectionItem(connectionItem);
  addCheckListener(dynamicComposite.getChecker());
  if (addContextFields) {
    Composite contextParentComp=new Composite(container,SWT.NONE);
    contextParentComp.setLayoutData(createFooterFormData(dynamicComposite));
    contextParentComp.setLayout(new GridLayout());
    ContextComposite contextComp=addContextFields(contextParentComp);
    contextComp.addPropertyChangeListener(dynamicComposite);
    contextComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  }
}

Fixed version (ground truth):
@Override public void createControl(final Composite parent){
  Composite container=new Composite(parent,SWT.NONE);
  container.setLayoutData(new GridData(GridData.FILL_BOTH));
  container.setLayout(new FormLayout());
  setControl(container);
  Element element=new FakeElement(form.getName());
  element.setReadOnly(!isRepositoryObjectEditable);
  dynamicComposite=new DynamicComposite(container,SWT.H_SCROLL | SWT.V_SCROLL | SWT.NO_FOCUS,EComponentCategory.BASIC,element,true,form,false);
  dynamicComposite.setLayoutData(createMainFormData(addContextFields));
  dynamicComposite.setConnectionItem(connectionItem);
  addCheckListener(dynamicComposite.getChecker());
  if (addContextFields) {
    Composite contextParentComp=new Composite(container,SWT.NONE);
    contextParentComp.setLayoutData(createFooterFormData(dynamicComposite));
    contextParentComp.setLayout(new GridLayout());
    ContextComposite contextComp=addContextFields(contextParentComp);
    contextComp.addPropertyChangeListener(dynamicComposite);
    contextComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  }
}
Program: 118169
Project: 118169
Buggy source:
private void init(){
  if (form.isCallBeforeFormPresent()) {
    try {
      componentService.beforeFormPresent(form.getName(),(ComponentProperties)form.getProperties());
    }
 catch (    Throwable e) {
      ExceptionHandler.process(e);
    }
  }
  dynamicComposite.resetParameters();
  dynamicComposite.refresh();
}

Fixed version (ground truth):
private void init(){
  if (form.isCallBeforeFormPresent()) {
    try {
      componentService.beforeFormPresent(form.getName(),form.getProperties());
    }
 catch (    Throwable e) {
      ExceptionHandler.process(e);
    }
  }
  dynamicComposite.resetParameters();
  dynamicComposite.refresh();
}
Program: 118170
Project: 118170
Buggy source:
@Override protected Control createDialogArea(Composite parent){
  Composite composite=(Composite)super.createDialogArea(parent);
  Composite comp=new Composite(composite,SWT.NONE);
  comp.setLayoutData(new GridData(GridData.FILL_BOTH));
  comp.setLayout(new FormLayout());
  Element element=new FakeElement(form.getName());
  dynamicComposite=new DynamicComposite(comp,SWT.H_SCROLL | SWT.V_SCROLL | SWT.NO_FOCUS,EComponentCategory.BASIC,element,true,comp.getBackground(),form,true);
  FormData data=new FormData();
  data.left=new FormAttachment(0,0);
  data.right=new FormAttachment(100,0);
  data.top=new FormAttachment(0,0);
  data.bottom=new FormAttachment(100,0);
  dynamicComposite.setLayoutData(data);
  dynamicComposite.setConnectionItem(connectionItem);
  init();
  return parent;
}

Fixed version (ground truth):
@Override protected Control createDialogArea(Composite parent){
  Composite composite=(Composite)super.createDialogArea(parent);
  Composite comp=new Composite(composite,SWT.NONE);
  comp.setLayoutData(new GridData(GridData.FILL_BOTH));
  comp.setLayout(new FormLayout());
  Element element=new FakeElement(form.getName());
  dynamicComposite=new DynamicComposite(comp,SWT.H_SCROLL | SWT.V_SCROLL | SWT.NO_FOCUS,EComponentCategory.BASIC,element,true,form,true);
  FormData data=new FormData();
  data.left=new FormAttachment(0,0);
  data.right=new FormAttachment(100,0);
  data.top=new FormAttachment(0,0);
  data.bottom=new FormAttachment(100,0);
  dynamicComposite.setLayoutData(data);
  dynamicComposite.setConnectionItem(connectionItem);
  init();
  return parent;
}
Program: 118171
Project: 118171
Buggy source:
@Override protected void okPressed(){
  if (form.isCallAfterFormFinish()) {
    try {
      componentService.afterFormFinish(form.getName(),(ComponentProperties)form.getProperties());
    }
 catch (    Throwable e) {
      ExceptionHandler.process(e);
    }
  }
  super.okPressed();
}

Fixed version (ground truth):
@Override protected void okPressed(){
  if (form.isCallAfterFormFinish()) {
    try {
      componentService.afterFormFinish(form.getName(),form.getProperties());
    }
 catch (    Throwable e) {
      ExceptionHandler.process(e);
    }
  }
  super.okPressed();
}
Program: 118172
Project: 118172
Buggy source:
@Override protected void cancelPressed(){
  componentService.cancelFormValues((ComponentProperties)form.getProperties(),form.getName());
  super.cancelPressed();
}

Fixed version (ground truth):
@Override protected void cancelPressed(){
  componentService.cancelFormValues(form.getProperties(),form.getName());
  super.cancelPressed();
}
Program: 118174
Project: 118174
Buggy source:
public static Object getParameterValue(IElement element,Property property,EParameterFieldType fieldType,boolean isInitializing){
  Object paramValue=property.getStoredValue();
  if (paramValue instanceof List) {
    return null;
  }
  if (fieldType == EParameterFieldType.CLOSED_LIST) {
    if (paramValue == null) {
      List<?> possibleValues=property.getPossibleValues();
      if (possibleValues != null && possibleValues.size() > 0) {
        paramValue=possibleValues.get(0);
        property.setValue(paramValue);
      }
    }
  }
 else   if (GenericTypeUtils.isStringType(property)) {
    String value=(String)paramValue;
    if ((isInitializing || StringUtils.isEmpty(value)) && !(element instanceof FakeElement || ContextParameterUtils.isContainContextParam(value))) {
      if (value == null) {
        value=StringUtils.EMPTY;
      }
      paramValue=TalendQuoteUtils.addPairQuotesIfNotExist(unescapeForJava(value));
    }
  }
 else   if (GenericTypeUtils.isBooleanType(property)) {
    if (paramValue == null) {
      paramValue=Boolean.FALSE;
      property.setValue(paramValue);
    }
  }
  return paramValue;
}

Fixed version (ground truth):
public static Object getParameterValue(IElement element,Property property,EParameterFieldType fieldType,boolean isInitializing){
  Object paramValue=property.getStoredValue();
  if (paramValue instanceof List) {
    return null;
  }
  if (fieldType == EParameterFieldType.CLOSED_LIST) {
    if (paramValue == null) {
      List<?> possibleValues=property.getPossibleValues();
      if (possibleValues != null && possibleValues.size() > 0) {
        paramValue=possibleValues.get(0);
        property.setValue(paramValue);
      }
    }
  }
 else   if (GenericTypeUtils.isStringType(property)) {
    String value=(String)paramValue;
    if ((isInitializing || StringUtils.isEmpty(value)) && !(element instanceof FakeElement || ContextParameterUtils.isContainContextParam(value))) {
      if (value == null) {
        value=StringUtils.EMPTY;
      }
      paramValue=TalendQuoteUtils.addPairQuotesIfNotExist(unescapeForJava(value));
      property.setValue(paramValue);
    }
  }
 else   if (GenericTypeUtils.isBooleanType(property)) {
    if (paramValue == null) {
      paramValue=Boolean.FALSE;
      property.setValue(paramValue);
    }
  }
  return paramValue;
}
Program: 118176
Project: 118176
Buggy source:
private void checkElement(Object obj,Set<Object> nodes){
  if (obj == null) {
    return;
  }
  if (obj instanceof RepositoryNode) {
    Object repositoryNode=null;
    RepositoryNode node=(RepositoryNode)obj;
    ERepositoryObjectType objectType=node.getObjectType();
    Property property=null;
    if (objectType != null) {
      if (objectType == ERepositoryObjectType.METADATA_CON_TABLE || objectType == ERepositoryObjectType.METADATA_CON_VIEW || objectType == ERepositoryObjectType.METADATA_CON_SYNONYM || objectType == ERepositoryObjectType.METADATA_CON_QUERY) {
        if (node.getObject() != null) {
          property=node.getObject().getProperty();
        }
      }
    }
    if (property != null) {
      repositoryNode=RepositoryNodeUtilities.getRepositoryNode(property.getId(),false);
      if (repositoryNode != null) {
        nodes.add(repositoryNode);
      }
    }
 else {
      nodes.add(node);
    }
  }
 else {
    nodes.add(obj);
  }
}

Fixed version (ground truth):
private void checkElement(Object obj,Set<Object> nodes){
  if (obj == null) {
    return;
  }
  if (obj instanceof RepositoryNode) {
    Object repositoryNode=null;
    RepositoryNode node=(RepositoryNode)obj;
    ERepositoryObjectType objectType=node.getObjectType();
    Property property=null;
    if (objectType != null) {
      if (objectType == ERepositoryObjectType.METADATA_CON_TABLE || objectType == ERepositoryObjectType.METADATA_CON_VIEW || objectType == ERepositoryObjectType.METADATA_CON_SYNONYM || objectType == ERepositoryObjectType.METADATA_CON_QUERY) {
        if (node.getObject() != null) {
          property=node.getObject().getProperty();
        }
      }
 else       if (objectType == ERepositoryObjectType.METADATA_CON_COLUMN) {
        if (node.getObject() != null && (node.getObject() instanceof MetadataColumnRepositoryObject)) {
          IRepositoryViewObject viewObj=((MetadataColumnRepositoryObject)node.getObject()).getViewObject();
          if (viewObj != null) {
            property=viewObj.getProperty();
          }
        }
      }
    }
    if (property != null) {
      repositoryNode=RepositoryNodeUtilities.getRepositoryNode(property.getId(),false);
      if (repositoryNode != null) {
        nodes.add(repositoryNode);
      }
    }
 else {
      nodes.add(node);
    }
  }
 else {
    nodes.add(obj);
  }
}
Program: 118179
Project: 118179
Buggy source:
protected void loadNodes(ProcessType process,Hashtable<String,Node> nodesHashtable) throws PersistenceException {
  EList nodeList;
  NodeType nType;
  nodeList=process.getNode();
  Node nc;
  EList listParamType;
  unloadedNode=new ArrayList<NodeType>();
  for (int i=0; i < nodeList.size(); i++) {
    nType=(NodeType)nodeList.get(i);
    listParamType=nType.getElementParameter();
    IComponent component=ComponentsFactoryProvider.getInstance().get(nType.getComponentName(),componentsType);
    if (component == null) {
      unloadedNode.add(nType);
      continue;
    }
    nc=loadNode(nType,component,nodesHashtable,listParamType);
  }
  if (!unloadedNode.isEmpty()) {
    for (int i=0; i < unloadedNode.size(); i++) {
      createDummyNode(unloadedNode.get(i),nodesHashtable);
    }
  }
}

Fixed version (ground truth):
protected void loadNodes(ProcessType process,Hashtable<String,Node> nodesHashtable) throws PersistenceException {
  EList nodeList;
  NodeType nType;
  nodeList=process.getNode();
  Node nc;
  EList listParamType;
  unloadedNode=new ArrayList<NodeType>();
  for (int i=0; i < nodeList.size(); i++) {
    nType=(NodeType)nodeList.get(i);
    listParamType=nType.getElementParameter();
    IComponent component=ComponentsFactoryProvider.getInstance().get(nType.getComponentName(),componentsType);
    if (component == null) {
      unloadedNode.add(nType);
      continue;
    }
    nc=loadNode(nType,component,nodesHashtable,listParamType);
  }
  if (!unloadedNode.isEmpty()) {
    List<NodeType> tempNodes=new ArrayList<NodeType>(unloadedNode);
    for (    NodeType unNode : tempNodes) {
      listParamType=unNode.getElementParameter();
      boolean isCurrentProject=ProjectManager.getInstance().isInCurrentMainProject(this.getProperty());
      String componentName=unNode.getComponentName();
      if (!isCurrentProject) {
        componentName=componentName + "String_Node_Str" + ProjectManager.getInstance().getProject(this.getProperty()).getLabel();
      }
      IComponent component=ComponentsFactoryProvider.getInstance().get(componentName,componentsType);
      if (component != null) {
        unloadedNode.remove(unNode);
        nc=loadNode(unNode,component,nodesHashtable,listParamType);
      }
    }
  }
  if (!unloadedNode.isEmpty()) {
    for (int i=0; i < unloadedNode.size(); i++) {
      createDummyNode(unloadedNode.get(i),nodesHashtable);
    }
  }
}
Program: 118182
Project: 118182
Buggy source:
private void saveLastUsedProjectAndBranch(){
  Project project=getProject();
  loginHelper.getPrefManipulator().setLastProject(project.getLabel());
  if (loginHelper.isRemoteConnection(getConnection())) {
    String branch=getBranch();
    if (branch == null) {
      branch=SVNConstant.EMPTY;
    }
    try {
      loginHelper.getPrefManipulator().setLastSVNBranch(new JSONObject(project.getEmfProject().getUrl()).getString("String_Node_Str"),project.getTechnicalLabel(),branch);
    }
 catch (    JSONException e) {
      ExceptionHandler.process(e);
    }
  }
}

Fixed version (ground truth):
private void saveLastUsedProjectAndBranch(){
  Project project=getProject();
  loginHelper.getPrefManipulator().setLastProject(project.getLabel());
  if (loginHelper.isRemoteConnection(getConnection())) {
    String branch=getBranch();
    if (branch == null) {
      branch=SVNConstant.EMPTY;
    }
    try {
      loginHelper.getPrefManipulator().setLastSVNBranch(new JSONObject(project.getEmfProject().getUrl()).getString("String_Node_Str"),project.getTechnicalLabel(),branch);
    }
 catch (    JSONException e) {
      ExceptionHandler.process(e);
    }
  }
 else {
    try {
      String lastLogonBranch=loginHelper.getPrefManipulator().getLastSVNBranch(new JSONObject(project.getEmfProject().getUrl()).getString("String_Node_Str"),project.getTechnicalLabel());
      ProjectManager.getInstance().setMainProjectBranch(project,lastLogonBranch);
    }
 catch (    JSONException e) {
      ExceptionHandler.process(e);
    }
  }
}
Program: 118183
Project: 118183
Buggy source:
private void addGenericType(List<INodeConnector> listConnector,EConnectionType type,String genericConnectorType,INode parentNode,boolean isOutput){
  GenericNodeConnector nodeConnector=new GenericNodeConnector(parentNode,isOutput);
  nodeConnector.setDefaultConnectionType(EConnectionType.FLOW_MAIN);
  nodeConnector.setGenericConnectorType(genericConnectorType);
  nodeConnector.setLinkName(type.getDefaultLinkName());
  if (type == EConnectionType.REJECT) {
    nodeConnector.addConnectionProperty(EConnectionType.FLOW_MAIN,new RGB(255,0,0),2);
    nodeConnector.getConnectionProperty(EConnectionType.FLOW_MAIN).setRGB(new RGB(255,0,0));
  }
 else {
    nodeConnector.addConnectionProperty(type,type.getRGB(),type.getDefaultLineStyle());
  }
  listConnector.add(nodeConnector);
}

Fixed version (ground truth):
private void addGenericType(List<INodeConnector> listConnector,EConnectionType type,String genericConnectorType,INode parentNode,ComponentProperties componentProperties,boolean isOutput){
  GenericNodeConnector nodeConnector=new GenericNodeConnector(parentNode,isOutput);
  nodeConnector.setComponentProperties(componentProperties);
  nodeConnector.setDefaultConnectionType(EConnectionType.FLOW_MAIN);
  nodeConnector.setGenericConnectorType(genericConnectorType);
  nodeConnector.setLinkName(type.getDefaultLinkName());
  if (type == EConnectionType.REJECT) {
    nodeConnector.addConnectionProperty(EConnectionType.FLOW_MAIN,new RGB(255,0,0),2);
    nodeConnector.getConnectionProperty(EConnectionType.FLOW_MAIN).setRGB(new RGB(255,0,0));
  }
 else {
    nodeConnector.addConnectionProperty(type,type.getRGB(),type.getDefaultLineStyle());
  }
  listConnector.add(nodeConnector);
}
Program: 118185
Project: 118185
Buggy source:
private Connector getConnector(){
  if (myConnector == null) {
    Set<? extends Connector> connectors=getParentNode().getComponentProperties().getAvailableConnectors(null,output);
    if (connectors != null) {
      for (      Connector connector : connectors) {
        if (connector.getName().equals(genericConnectorType)) {
          myConnector=connector;
          break;
        }
      }
    }
  }
  return myConnector;
}

Fixed version (ground truth):
private Connector getConnector(){
  if (myConnector == null) {
    Set<? extends Connector> connectors=getComponentProperties().getAvailableConnectors(null,output);
    if (connectors != null) {
      for (      Connector connector : connectors) {
        if (connector.getName().equals(genericConnectorType)) {
          myConnector=connector;
          break;
        }
      }
    }
  }
  return myConnector;
}
Program: 118186
Project: 118186
Buggy source:
public Connector getComponentConnector(){
  Set<? extends Connector> connectors=getParentNode().getComponentProperties().getPossibleConnectors(output);
  if (connectors != null) {
    for (    Connector connector : connectors) {
      if (connector.getName().equals(genericConnectorType)) {
        return connector;
      }
    }
  }
  return null;
}

Fixed version (ground truth):
public Connector getComponentConnector(){
  Set<? extends Connector> connectors=getComponentProperties().getPossibleConnectors(output);
  if (connectors != null) {
    for (    Connector connector : connectors) {
      if (connector.getName().equals(genericConnectorType)) {
        return connector;
      }
    }
  }
  return null;
}
Program: 118192
Project: 118192
Buggy source:
public void finishPressed(){
  if (LoginHelper.isRestart) {
    loginDialog.okPressed();
  }
 else {
    boolean isLogInOk=loginHelper.logIn(getConnection(),getProject());
    if (isLogInOk) {
      LoginHelper.setAlwaysAskAtStartup(alwaysAsk.getSelection());
      loginDialog.okPressed();
    }
 else {
      fillUIProjectListWithBusyCursor();
      revertUpdateStatus();
    }
  }
}

Fixed version (ground truth):
public void finishPressed(){
  if (LoginHelper.isRestart) {
    loginDialog.okPressed();
  }
 else {
    saveLastUsedProjectAndBranch();
    boolean isLogInOk=loginHelper.logIn(getConnection(),getProject());
    if (isLogInOk) {
      LoginHelper.setAlwaysAskAtStartup(alwaysAsk.getSelection());
      loginDialog.okPressed();
    }
 else {
      fillUIProjectListWithBusyCursor();
      revertUpdateStatus();
    }
  }
}
Program: 118193
Project: 118193
Buggy source:
@Override public void selectionChanged(SelectionChangedEvent event){
  String branch=getBranch();
  if (branch == null) {
    branch=SVNConstant.EMPTY;
  }
  Project project=getProject();
  try {
    loginHelper.getPrefManipulator().setLastSVNBranch(new JSONObject(project.getEmfProject().getUrl()).getString("String_Node_Str"),project.getTechnicalLabel(),branch);
  }
 catch (  JSONException e) {
    ExceptionHandler.process(e);
  }
}

Fixed version (ground truth):
@Override public void selectionChanged(SelectionChangedEvent event){
}
Program: 118194
Project: 118194
Buggy source:
@Override public ExecutionResult execute(Project project){
  try {
    URL p=MetadataTalendType.getProjectForderURLOfMappingsFile();
    changeSAPHanaMappingFile(p);
    URL s=MetadataTalendType.getSystemForderURLOfMappingsFile();
    changeSAPHanaMappingFile(s);
    return ExecutionResult.SUCCESS_NO_ALERT;
  }
 catch (  Exception e) {
    return ExecutionResult.FAILURE;
  }
}

Fixed version (ground truth):
@Override public ExecutionResult execute(Project project){
  try {
    URL p=MetadataTalendType.getProjectForderURLOfMappingsFile();
    changeSAPHanaMappingFile(p);
    URL s=MetadataTalendType.getSystemForderURLOfMappingsFile();
    changeSAPHanaMappingFile(s);
    if (GlobalServiceRegister.getDefault().isServiceRegistered(ICoreService.class)) {
      ICoreService service=(ICoreService)GlobalServiceRegister.getDefault().getService(ICoreService.class);
      service.synchronizeMapptingXML();
      return ExecutionResult.SUCCESS_NO_ALERT;
    }
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
  return ExecutionResult.FAILURE;
}