nus-yam/ex-repair huggingface dataset:
Program: 121888
Project: 121888
Buggy source:
public void selectionChanged(SelectionChangedEvent event){
  IStructuredSelection selection=(IStructuredSelection)event.getSelection();
  TalendPropertyTabDescriptor descriptor=(TalendPropertyTabDescriptor)selection.getFirstElement();
  if (descriptor == null) {
    return;
  }
  if (currentSelectedTab != null && (!currentSelectedTab.getData().equals(descriptor.getData()) || currentSelectedTab.getCategory() != descriptor.getCategory())) {
    for (    Control curControl : tabFactory.getTabComposite().getChildren()) {
      curControl.dispose();
    }
  }
  if (element == null || !element.equals(descriptor.getData()) || currentSelectedTab == null || currentSelectedTab.getCategory() != descriptor.getCategory() || selectedPrimary) {
    element=(Element)descriptor.getData();
    currentSelectedTab=descriptor;
    createDynamicComposite(tabFactory.getTabComposite(),(Element)descriptor.getData(),descriptor.getCategory());
    selectedPrimary=false;
  }
}

Fixed version (ground truth):
@Override public void selectionChanged(SelectionChangedEvent event){
  IStructuredSelection selection=(IStructuredSelection)event.getSelection();
  TalendPropertyTabDescriptor descriptor=(TalendPropertyTabDescriptor)selection.getFirstElement();
  if (descriptor == null) {
    return;
  }
  if (currentSelectedTab != null && (!currentSelectedTab.getData().equals(descriptor.getData()) || currentSelectedTab.getCategory() != descriptor.getCategory())) {
    for (    Control curControl : tabFactory.getTabComposite().getChildren()) {
      curControl.dispose();
    }
  }
  if (element == null || !element.equals(descriptor.getData()) || currentSelectedTab == null || currentSelectedTab.getCategory() != descriptor.getCategory() || selectedPrimary) {
    element=(Element)descriptor.getData();
    currentSelectedTab=descriptor;
    createDynamicComposite(tabFactory.getTabComposite(),(Element)descriptor.getData(),descriptor.getCategory());
    selectedPrimary=false;
  }
}
Program: 121889
Project: 121889
Buggy source:
@Override public void createPartControl(Composite parent){
  this.parent=parent;
  tabFactory.initComposite(parent,true);
  tabFactory.addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent event){
      IStructuredSelection selection=(IStructuredSelection)event.getSelection();
      TalendPropertyTabDescriptor descriptor=(TalendPropertyTabDescriptor)selection.getFirstElement();
      if (descriptor == null) {
        return;
      }
      if (currentSelectedTab != null && (!currentSelectedTab.getData().equals(descriptor.getData()) || currentSelectedTab.getCategory() != descriptor.getCategory())) {
        for (        Control curControl : tabFactory.getTabComposite().getChildren()) {
          curControl.dispose();
        }
      }
      if (element == null || !element.equals(descriptor.getData()) || currentSelectedTab == null || currentSelectedTab.getCategory() != descriptor.getCategory() || selectedPrimary) {
        element=(Element)descriptor.getData();
        currentSelectedTab=descriptor;
        createDynamicComposite(tabFactory.getTabComposite(),(Element)descriptor.getData(),descriptor.getCategory());
        selectedPrimary=false;
      }
    }
  }
);
}

Fixed version (ground truth):
@Override public void createPartControl(Composite parent){
  this.parent=parent;
  tabFactory.initComposite(parent,true);
  tabFactory.addSelectionChangedListener(new ISelectionChangedListener(){
    @Override public void selectionChanged(    SelectionChangedEvent event){
      IStructuredSelection selection=(IStructuredSelection)event.getSelection();
      TalendPropertyTabDescriptor descriptor=(TalendPropertyTabDescriptor)selection.getFirstElement();
      if (descriptor == null) {
        return;
      }
      if (currentSelectedTab != null && (!currentSelectedTab.getData().equals(descriptor.getData()) || currentSelectedTab.getCategory() != descriptor.getCategory())) {
        for (        Control curControl : tabFactory.getTabComposite().getChildren()) {
          curControl.dispose();
        }
      }
      if (element == null || !element.equals(descriptor.getData()) || currentSelectedTab == null || currentSelectedTab.getCategory() != descriptor.getCategory() || selectedPrimary) {
        element=(Element)descriptor.getData();
        currentSelectedTab=descriptor;
        createDynamicComposite(tabFactory.getTabComposite(),(Element)descriptor.getData(),descriptor.getCategory());
        selectedPrimary=false;
      }
    }
  }
);
}
Program: 121890
Project: 121890
Buggy source:
public Object getFirstElement(){
  return null;
}

Fixed version (ground truth):
@Override public Object getFirstElement(){
  return null;
}
Program: 121893
Project: 121893
Buggy source:
private void setDbVersion(IElementParameter elementParameter,String value){
  if (elementParameter == null || value == null) {
    return;
  }
  if (value.indexOf("String_Node_Str") != -1) {
    elementParameter.setValue(value);
    elementParameter.setListItemsDisplayName(StatsAndLogsConstants.ACCESS_VERSION_DISPLAY);
    elementParameter.setListItemsValue(StatsAndLogsConstants.ACCESS_VERSION_DRIVER);
  }
 else   if (value.indexOf("String_Node_Str") != -1) {
    elementParameter.setValue(value);
    elementParameter.setListItemsDisplayName(StatsAndLogsConstants.ORACLE_VERSION_DISPLAY);
    elementParameter.setListItemsValue(StatsAndLogsConstants.ORACLE_VERSION_DRIVER);
  }
 else   if (value.indexOf("String_Node_Str") != -1) {
    elementParameter.setValue(value);
    elementParameter.setListItemsDisplayName(StatsAndLogsConstants.AS400_VERSION_DISPLAY);
    elementParameter.setListItemsValue(StatsAndLogsConstants.AS400_VERSION_DRIVER);
  }
 else   if (value.indexOf("String_Node_Str") != -1) {
    elementParameter.setValue(value);
    elementParameter.setListItemsDisplayName(StatsAndLogsConstants.MYSQL_VERSION_DISPLAY);
    elementParameter.setListItemsValue(StatsAndLogsConstants.MYSQL_VERSION_DRIVER);
  }
}

Fixed version (ground truth):
private void setDbVersion(IElementParameter elementParameter,String value){
  if (elementParameter == null || value == null) {
    return;
  }
  if (value.indexOf("String_Node_Str") != -1) {
    elementParameter.setValue(value);
    elementParameter.setListItemsDisplayName(StatsAndLogsConstants.ACCESS_VERSION_DISPLAY);
    elementParameter.setListItemsValue(StatsAndLogsConstants.ACCESS_VERSION_CODE);
  }
 else   if (value.indexOf("String_Node_Str") != -1) {
    elementParameter.setValue(value);
    elementParameter.setListItemsDisplayName(StatsAndLogsConstants.ORACLE_VERSION_DISPLAY);
    elementParameter.setListItemsValue(StatsAndLogsConstants.ORACLE_VERSION_CODE);
  }
 else   if (value.indexOf("String_Node_Str") != -1) {
    elementParameter.setValue(value);
    elementParameter.setListItemsDisplayName(StatsAndLogsConstants.AS400_VERSION_DISPLAY);
    elementParameter.setListItemsValue(StatsAndLogsConstants.AS400_VERSION_CODE);
  }
 else   if (value.indexOf("String_Node_Str") != -1) {
    elementParameter.setValue(value);
    elementParameter.setListItemsDisplayName(StatsAndLogsConstants.MYSQL_VERSION_DISPLAY);
    elementParameter.setListItemsValue(StatsAndLogsConstants.MYSQL_VERSION_CODE);
  }
}
Program: 121895
Project: 121895
Buggy source:
private void setDbVersion(IElementParameter elementParameter,String value){
  if (elementParameter == null || value == null) {
    return;
  }
  if (value.indexOf("String_Node_Str") != -1) {
    elementParameter.setValue(value);
    elementParameter.setListItemsDisplayName(StatsAndLogsConstants.ACCESS_VERSION_DISPLAY);
    elementParameter.setListItemsValue(StatsAndLogsConstants.ACCESS_VERSION_CODE);
  }
 else   if (value.indexOf("String_Node_Str") != -1) {
    elementParameter.setValue(value);
    elementParameter.setListItemsDisplayName(StatsAndLogsConstants.ORACLE_VERSION_DISPLAY);
    elementParameter.setListItemsValue(StatsAndLogsConstants.ORACLE_VERSION_CODE);
  }
 else   if (value.indexOf("String_Node_Str") != -1) {
    elementParameter.setValue(value);
    elementParameter.setListItemsDisplayName(StatsAndLogsConstants.AS400_VERSION_DISPLAY);
    elementParameter.setListItemsValue(StatsAndLogsConstants.AS400_VERSION_CODE);
  }
 else   if (value.indexOf("String_Node_Str") != -1) {
    elementParameter.setValue(value);
    elementParameter.setListItemsDisplayName(StatsAndLogsConstants.MYSQL_VERSION_DISPLAY);
    elementParameter.setListItemsValue(StatsAndLogsConstants.MYSQL_VERSION_CODE);
  }
}

Fixed version (ground truth):
private void setDbVersion(IElementParameter elementParameter,String value){
  if (elementParameter == null || value == null) {
    return;
  }
  if (value.indexOf("String_Node_Str") != -1) {
    elementParameter.setValue(value);
    elementParameter.setListItemsDisplayName(StatsAndLogsConstants.ACCESS_VERSION_DISPLAY);
    elementParameter.setListItemsValue(StatsAndLogsConstants.ACCESS_VERSION_CODE);
  }
 else   if (value.indexOf("String_Node_Str") != -1) {
    elementParameter.setValue(value);
    elementParameter.setListItemsDisplayName(StatsAndLogsConstants.ORACLE_VERSION_DISPLAY);
    elementParameter.setListItemsValue(StatsAndLogsConstants.ORACLE_VERSION_DRIVER);
  }
 else   if (value.indexOf("String_Node_Str") != -1) {
    elementParameter.setValue(value);
    elementParameter.setListItemsDisplayName(StatsAndLogsConstants.AS400_VERSION_DISPLAY);
    elementParameter.setListItemsValue(StatsAndLogsConstants.AS400_VERSION_CODE);
  }
 else   if (value.indexOf("String_Node_Str") != -1) {
    elementParameter.setValue(value);
    elementParameter.setListItemsDisplayName(StatsAndLogsConstants.MYSQL_VERSION_DISPLAY);
    elementParameter.setListItemsValue(StatsAndLogsConstants.MYSQL_VERSION_CODE);
  }
}
Program: 121898
Project: 121898
Buggy source:
public void initialize(){
  List<Object> listNames=getVertionColumnNames();
  if (listNames.isEmpty()) {
    return;
  }
  int customId=0;
  List<IMetadataTable> listTables=getScdNodeMetadataList();
  for (  IMetadataTable table : listTables) {
    if (table instanceof MetadataTable) {
      MetadataTable metable=(MetadataTable)table;
      List<IMetadataColumn> metColumns=metable.getListColumns();
      for (      IMetadataColumn column : metColumns) {
        if (listNames.contains(column.getLabel())) {
          column.setCustomId(customId);
          column.setCustom(true);
          column.setReadOnly(true);
          customId++;
        }
      }
    }
  }
}

Fixed version (ground truth):
public void initialize(){
}
Program: 121901
Project: 121901
Buggy source:
public void initialize(){
  List<Object> listNames=getVertionColumnNames();
  if (listNames.isEmpty()) {
    return;
  }
  int customId=0;
  List<IMetadataTable> listTables=getScdNodeMetadataList();
  for (  IMetadataTable table : listTables) {
    if (table instanceof MetadataTable) {
      MetadataTable metable=(MetadataTable)table;
      List<IMetadataColumn> metColumns=metable.getListColumns();
      for (      IMetadataColumn column : metColumns) {
        if (listNames.contains(column.getLabel())) {
          column.setCustomId(customId);
          column.setCustom(true);
          column.setReadOnly(true);
          customId++;
        }
      }
    }
  }
}

Fixed version (ground truth):
public void initialize(){
}
Program: 121903
Project: 121903
Buggy source:
public int compare(String o1,String o2){
  return o1.compareToIgnoreCase(o2);
}

Fixed version (ground truth):
@Override public int compare(String o1,String o2){
  return o1.compareToIgnoreCase(o2);
}
Program: 121905
Project: 121905
Buggy source:
public int compare(String o1,String o2){
  return o1.compareToIgnoreCase(o2);
}

Fixed version (ground truth):
@Override public int compare(String o1,String o2){
  return o1.compareToIgnoreCase(o2);
}
Program: 121906
Project: 121906
Buggy source:
private void setDbVersion(IElementParameter elementParameter,String value){
  if (elementParameter == null || value == null) {
    return;
  }
  if (value.indexOf("String_Node_Str") != -1) {
    elementParameter.setValue(value);
    elementParameter.setListItemsDisplayName(StatsAndLogsConstants.ACCESS_VERSION_DISPLAY);
    elementParameter.setListItemsValue(StatsAndLogsConstants.ACCESS_VERSION_DRIVER);
  }
 else   if (value.indexOf("String_Node_Str") != -1) {
    elementParameter.setValue(value);
    elementParameter.setListItemsDisplayName(StatsAndLogsConstants.ORACLE_VERSION_DISPLAY);
    elementParameter.setListItemsValue(StatsAndLogsConstants.ORACLE_VERSION_DRIVER);
  }
 else   if (value.indexOf("String_Node_Str") != -1) {
    elementParameter.setValue(value);
    elementParameter.setListItemsDisplayName(StatsAndLogsConstants.AS400_VERSION_DISPLAY);
    elementParameter.setListItemsValue(StatsAndLogsConstants.AS400_VERSION_DRIVER);
  }
 else   if (value.indexOf("String_Node_Str") != -1) {
    elementParameter.setValue(value);
    elementParameter.setListItemsDisplayName(StatsAndLogsConstants.MYSQL_VERSION_DISPLAY);
    elementParameter.setListItemsValue(StatsAndLogsConstants.MYSQL_VERSION_DRIVER);
  }
}

Fixed version (ground truth):
private void setDbVersion(IElementParameter elementParameter,String value){
  if (elementParameter == null || value == null) {
    return;
  }
  if (value.indexOf("String_Node_Str") != -1) {
    elementParameter.setValue(value);
    elementParameter.setListItemsDisplayName(StatsAndLogsConstants.ACCESS_VERSION_DISPLAY);
    elementParameter.setListItemsValue(StatsAndLogsConstants.ACCESS_VERSION_CODE);
  }
 else   if (value.indexOf("String_Node_Str") != -1) {
    elementParameter.setValue(value);
    elementParameter.setListItemsDisplayName(StatsAndLogsConstants.ORACLE_VERSION_DISPLAY);
    elementParameter.setListItemsValue(StatsAndLogsConstants.ORACLE_VERSION_CODE);
  }
 else   if (value.indexOf("String_Node_Str") != -1) {
    elementParameter.setValue(value);
    elementParameter.setListItemsDisplayName(StatsAndLogsConstants.AS400_VERSION_DISPLAY);
    elementParameter.setListItemsValue(StatsAndLogsConstants.AS400_VERSION_CODE);
  }
 else   if (value.indexOf("String_Node_Str") != -1) {
    elementParameter.setValue(value);
    elementParameter.setListItemsDisplayName(StatsAndLogsConstants.MYSQL_VERSION_DISPLAY);
    elementParameter.setListItemsValue(StatsAndLogsConstants.MYSQL_VERSION_CODE);
  }
}
Program: 121907
Project: 121907
Buggy source:
private void addSubJobResources(ExportFileResource[] allResources,ProcessItem process,boolean needChildren,Map<ExportChoice,Object> exportChoice,ExportFileResource libResource,ExportFileResource contextResource,ExportFileResource srcResource,String selectedJobVersion){
  List<JobInfo> list=new ArrayList<JobInfo>();
  String projectName=getCorrespondingProjectName(process);
  if (needChildren) {
    try {
      List<ProcessItem> processedJob=new ArrayList<ProcessItem>();
      getChildrenJobAndContextName(allResources,process.getProperty().getLabel(),list,process,projectName,processedJob,srcResource,exportChoice,selectedJobVersion);
    }
 catch (    Exception e) {
      ExceptionHandler.process(e);
    }
  }
  for (Iterator<JobInfo> iter=list.iterator(); iter.hasNext(); ) {
    JobInfo jobInfo=iter.next();
    libResource.addResources(getJobScripts(projectName,jobInfo.getJobName(),jobInfo.getJobVersion(),isOptionChoosed(ExportChoice.needJobScript)));
    addContextScripts(jobInfo.getProcessItem(),jobInfo.getJobName(),jobInfo.getJobVersion(),contextResource,isOptionChoosed(ExportChoice.needContext));
  }
}

Fixed version (ground truth):
private void addSubJobResources(ExportFileResource[] allResources,ProcessItem process,boolean needChildren,Map<ExportChoice,Object> exportChoice,ExportFileResource libResource,ExportFileResource contextResource,ExportFileResource srcResource,String selectedJobVersion){
  List<JobInfo> list=new ArrayList<JobInfo>();
  String projectName=getCorrespondingProjectName(process);
  if (needChildren) {
    try {
      List<ProcessItem> processedJob=new ArrayList<ProcessItem>();
      getChildrenJobAndContextName(allResources,process.getProperty().getLabel(),list,process,projectName,processedJob,srcResource,exportChoice,selectedJobVersion);
    }
 catch (    Exception e) {
      ExceptionHandler.process(e);
    }
  }
  for (  JobInfo jobInfo : list) {
    libResource.addResources(getJobScripts(projectName,jobInfo.getJobName(),jobInfo.getJobVersion(),isOptionChoosed(ExportChoice.needJobScript)));
    addContextScripts(jobInfo.getProcessItem(),jobInfo.getJobName(),jobInfo.getJobVersion(),contextResource,isOptionChoosed(ExportChoice.needContext));
  }
}
Program: 121908
Project: 121908
Buggy source:
/** 
 * run checks the command-line arguments and runs the tool.
 * @param args String[] command-line arguments.
 * @return
 */
protected int run(String[] args){
  CLArgsParser argsParser=new CLArgsParser(args,options);
  if (null != argsParser.getErrorString()) {
    System.err.println(Messages.getMessage("String_Node_Str",argsParser.getErrorString()));
    printUsage();
    return (1);
  }
  List clOptions=argsParser.getArguments();
  int size=clOptions.size();
  try {
    for (int i=0; i < size; i++) {
      if (!parseOption((CLOption)clOptions.get(i))) {
        return (1);
      }
    }
    if (!validateOptions()) {
      return (1);
    }
    if (!namespaceMap.isEmpty()) {
      emitter.setNamespaceMap(namespaceMap);
    }
    TypeMappingRegistryImpl tmr=new TypeMappingRegistryImpl();
    tmr.doRegisterFromVersion(typeMappingVersion);
    emitter.setTypeMappingRegistry(tmr);
    emitter.setCls(className);
    if (wsdlImplFilename == null) {
      emitter.emit(wsdlFilename,mode);
    }
 else {
      emitter.emit(wsdlFilename,wsdlImplFilename);
    }
    if (isDeploy) {
      generateServerSide(emitter,(wsdlImplFilename != null) ? wsdlImplFilename : wsdlFilename);
    }
    return (0);
  }
 catch (  Throwable t) {
    this.t=t;
    return (1);
  }
}

Fixed version (ground truth):
/** 
 * run checks the command-line arguments and runs the tool.
 * @param args String[] command-line arguments.
 * @return
 */
@Override protected int run(String[] args){
  CLArgsParser argsParser=new CLArgsParser(args,options);
  if (null != argsParser.getErrorString()) {
    System.err.println(Messages.getMessage("String_Node_Str",argsParser.getErrorString()));
    printUsage();
    return (1);
  }
  List clOptions=argsParser.getArguments();
  int size=clOptions.size();
  try {
    for (int i=0; i < size; i++) {
      if (!parseOption((CLOption)clOptions.get(i))) {
        return (1);
      }
    }
    if (!validateOptions()) {
      return (1);
    }
    if (!namespaceMap.isEmpty()) {
      emitter.setNamespaceMap(namespaceMap);
    }
    TypeMappingRegistryImpl tmr=new TypeMappingRegistryImpl();
    tmr.doRegisterFromVersion(typeMappingVersion);
    emitter.setTypeMappingRegistry(tmr);
    emitter.setCls(className);
    if (wsdlImplFilename == null) {
      emitter.emit(wsdlFilename,mode);
    }
 else {
      emitter.emit(wsdlFilename,wsdlImplFilename);
    }
    if (isDeploy) {
      generateServerSide(emitter,(wsdlImplFilename != null) ? wsdlImplFilename : wsdlFilename);
    }
    return (0);
  }
 catch (  Throwable t) {
    this.t=t;
    return (1);
  }
}
Program: 121914
Project: 121914
Buggy source:
public void initialize(){
  List<Object> listNames=getVertionColumnNames();
  if (listNames.isEmpty()) {
    return;
  }
  int customId=0;
  List<IMetadataTable> listTables=getScdNodeMetadataList();
  for (  IMetadataTable table : listTables) {
    if (table instanceof MetadataTable) {
      MetadataTable metable=(MetadataTable)table;
      List<IMetadataColumn> metColumns=metable.getListColumns();
      for (      IMetadataColumn column : metColumns) {
        if (listNames.contains(column.getLabel())) {
          column.setCustomId(customId);
          column.setCustom(true);
          column.setReadOnly(true);
          customId++;
        }
      }
    }
  }
}

Fixed version (ground truth):
public void initialize(){
}
Program: 121917
Project: 121917
Buggy source:
private void refreshResumingConnections(){
  if (propName.equals(EParameterName.RESUMING_CHECKPOINT.getName()) || this.elem instanceof Connection) {
    if (((Connection)this.elem).getConnectionTrace() != null && !propName.equals(EParameterName.CONDITION))     ((Connection)this.elem).getConnectionTrace().setPropertyValue(EParameterName.RESUMING_CHECKPOINT.getName(),true);
  }
}

Fixed version (ground truth):
private void refreshResumingConnections(){
  if (propName.equals(EParameterName.RESUMING_CHECKPOINT.getName()) || this.elem instanceof Connection) {
    if (((Connection)this.elem).getConnectionTrace() != null && !propName.equals(EParameterName.CONDITION)) {
      ((Connection)this.elem).getConnectionTrace().setPropertyValue(EParameterName.RESUMING_CHECKPOINT.getName(),true);
    }
  }
}
Program: 121919
Project: 121919
Buggy source:
private void refreshTraceConnections(){
  if (propName.equals(EParameterName.TRACES_CONNECTION_ENABLE.getName()) || this.elem instanceof Connection) {
    if (((Connection)this.elem).getConnectionTrace() != null && !propName.equals(EParameterName.CONDITION))     ((Connection)this.elem).getConnectionTrace().setPropertyValue(EParameterName.TRACES_SHOW_ENABLE.getName(),true);
  }
}

Fixed version (ground truth):
private void refreshTraceConnections(){
  if (propName.equals(EParameterName.TRACES_CONNECTION_ENABLE.getName()) || this.elem instanceof Connection) {
    if (((Connection)this.elem).getConnectionTrace() != null && !propName.equals(EParameterName.CONDITION)) {
      ((Connection)this.elem).getConnectionTrace().setPropertyValue(EParameterName.TRACES_SHOW_ENABLE.getName(),true);
    }
  }
}
Program: 121920
Project: 121920
Buggy source:
@Override public void init(IEditorSite site,IEditorInput editorInput) throws PartInitException {
  setSite(site);
  setInput(editorInput);
  site.setSelectionProvider(new MultiPageTalendSelectionProvider(this));
  getSite().getWorkbenchWindow().getSelectionService().addSelectionListener(this);
  IRepositoryService service=CorePlugin.getDefault().getRepositoryService();
  IProxyRepositoryFactory repFactory=service.getProxyRepositoryFactory();
  processEditorInput=(JobEditorInput)editorInput;
  IProcess2 currentProcess=processEditorInput.getLoadedProcess();
  if (!currentProcess.isReadOnly()) {
    try {
      Property property=processEditorInput.getItem().getProperty();
      propertyInformation=new ArrayList(property.getInformations());
      property.eAdapters().add(dirtyListener);
      display=site.getShell().getDisplay();
      repFactory.addRepositoryWorkUnitListener(repositoryWorkListener);
      repFactory.lock(currentProcess);
      ERepositoryStatus status=repFactory.getStatus(currentProcess.getProperty().getItem());
      boolean locked=status != ERepositoryStatus.DEFAULT;
      if (!locked) {
        setReadOnly(true);
      }
      revisionChanged=true;
    }
 catch (    PersistenceException e) {
      ExceptionHandler.process(e);
    }
catch (    BusinessException e) {
      ExceptionHandler.process(e);
    }
  }
 else {
    setReadOnly(true);
    revisionChanged=true;
  }
  getSite().getWorkbenchWindow().getPartService().addPartListener(partListener);
}

Fixed version (ground truth):
@Override public void init(IEditorSite site,IEditorInput editorInput) throws PartInitException {
  setSite(site);
  setInput(editorInput);
  site.setSelectionProvider(new MultiPageTalendSelectionProvider(this));
  getSite().getWorkbenchWindow().getSelectionService().addSelectionListener(this);
  IRepositoryService service=CorePlugin.getDefault().getRepositoryService();
  IProxyRepositoryFactory repFactory=service.getProxyRepositoryFactory();
  processEditorInput=(JobEditorInput)editorInput;
  IProcess2 currentProcess=processEditorInput.getLoadedProcess();
  if (!currentProcess.isReadOnly()) {
    try {
      Property property=processEditorInput.getItem().getProperty();
      propertyInformation=new ArrayList(property.getInformations());
      property.eAdapters().add(dirtyListener);
      display=site.getShell().getDisplay();
      repFactory.addRepositoryWorkUnitListener(repositoryWorkListener);
      repFactory.lock(currentProcess);
      boolean locked=repFactory.getStatus(currentProcess) == ERepositoryStatus.LOCK_BY_USER;
      if (!locked) {
        setReadOnly(true);
      }
      revisionChanged=true;
    }
 catch (    PersistenceException e) {
      ExceptionHandler.process(e);
    }
catch (    BusinessException e) {
      ExceptionHandler.process(e);
    }
  }
 else {
    setReadOnly(true);
    revisionChanged=true;
  }
  getSite().getWorkbenchWindow().getPartService().addPartListener(partListener);
}
Program: 121921
Project: 121921
Buggy source:
@Override public void init(IEditorSite site,IEditorInput editorInput) throws PartInitException {
  setSite(site);
  setInput(editorInput);
  site.setSelectionProvider(new MultiPageTalendSelectionProvider(this));
  getSite().getWorkbenchWindow().getSelectionService().addSelectionListener(this);
  IRepositoryService service=CorePlugin.getDefault().getRepositoryService();
  IProxyRepositoryFactory repFactory=service.getProxyRepositoryFactory();
  processEditorInput=(JobEditorInput)editorInput;
  IProcess2 currentProcess=processEditorInput.getLoadedProcess();
  if (!currentProcess.isReadOnly()) {
    try {
      Property property=processEditorInput.getItem().getProperty();
      propertyInformation=new ArrayList(property.getInformations());
      property.eAdapters().add(dirtyListener);
      display=site.getShell().getDisplay();
      repFactory.addRepositoryWorkUnitListener(repositoryWorkListener);
      repFactory.lock(currentProcess);
      boolean locked=currentProcess.getProperty().getItem().getState().isLocked();
      if (!locked) {
        setReadOnly(true);
      }
      revisionChanged=true;
    }
 catch (    PersistenceException e) {
      ExceptionHandler.process(e);
    }
catch (    BusinessException e) {
      ExceptionHandler.process(e);
    }
  }
 else {
    setReadOnly(true);
    revisionChanged=true;
  }
  getSite().getWorkbenchWindow().getPartService().addPartListener(partListener);
}

Fixed version (ground truth):
@Override public void init(IEditorSite site,IEditorInput editorInput) throws PartInitException {
  setSite(site);
  setInput(editorInput);
  site.setSelectionProvider(new MultiPageTalendSelectionProvider(this));
  getSite().getWorkbenchWindow().getSelectionService().addSelectionListener(this);
  IRepositoryService service=CorePlugin.getDefault().getRepositoryService();
  IProxyRepositoryFactory repFactory=service.getProxyRepositoryFactory();
  processEditorInput=(JobEditorInput)editorInput;
  IProcess2 currentProcess=processEditorInput.getLoadedProcess();
  if (!currentProcess.isReadOnly()) {
    try {
      Property property=processEditorInput.getItem().getProperty();
      propertyInformation=new ArrayList(property.getInformations());
      property.eAdapters().add(dirtyListener);
      display=site.getShell().getDisplay();
      repFactory.addRepositoryWorkUnitListener(repositoryWorkListener);
      repFactory.lock(currentProcess);
      ERepositoryStatus status=repFactory.getStatus(currentProcess.getProperty().getItem());
      boolean locked=status != ERepositoryStatus.DEFAULT;
      if (!locked) {
        setReadOnly(true);
      }
      revisionChanged=true;
    }
 catch (    PersistenceException e) {
      ExceptionHandler.process(e);
    }
catch (    BusinessException e) {
      ExceptionHandler.process(e);
    }
  }
 else {
    setReadOnly(true);
    revisionChanged=true;
  }
  getSite().getWorkbenchWindow().getPartService().addPartListener(partListener);
}
Program: 121922
Project: 121922
Buggy source:
public static List<ConnectionPart> getConnectionParts(ProcessPart processPart,Point point,Node node){
  List<ConnectionPart> connectionParts=new ArrayList<ConnectionPart>();
  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 && canCreateNodeOnLink((Connection)((ConnectionPart)conn).getModel(),node)) {
                  ConnectionPart connPart=(ConnectionPart)conn;
                  if (connPart.getFigure() != null && connPart.getFigure().getBounds().contains(point)) {
                    connectionParts.add((ConnectionPart)conn);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  return connectionParts;
}

Fixed version (ground truth):
public static List<ConnectionPart> getConnectionParts(ProcessPart processPart,Point point,Node node){
  List<ConnectionPart> connectionParts=new ArrayList<ConnectionPart>();
  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 && canCreateNodeOnLink((Connection)((ConnectionPart)conn).getModel(),node)) {
                  ConnectionPart connPart=(ConnectionPart)conn;
                  connectionParts.add((ConnectionPart)conn);
                }
              }
            }
          }
        }
      }
    }
  }
  return connectionParts;
}
Program: 121924
Project: 121924
Buggy source:
public static List<ConnectionPart> getConnectionParts(ProcessPart processPart,Point point,Node node){
  List<ConnectionPart> connectionParts=new ArrayList<ConnectionPart>();
  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 && canCreateNodeOnLink((Connection)((ConnectionPart)conn).getModel(),node)) {
                  ConnectionPart connPart=(ConnectionPart)conn;
                  if (connPart.getFigure() != null && connPart.getFigure().getBounds().contains(point)) {
                    connectionParts.add((ConnectionPart)conn);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  return connectionParts;
}

Fixed version (ground truth):
public static List<ConnectionPart> getConnectionParts(ProcessPart processPart,Point point,Node node){
  List<ConnectionPart> connectionParts=new ArrayList<ConnectionPart>();
  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 && canCreateNodeOnLink((Connection)((ConnectionPart)conn).getModel(),node)) {
                  ConnectionPart connPart=(ConnectionPart)conn;
                  connectionParts.add((ConnectionPart)conn);
                }
              }
            }
          }
        }
      }
    }
  }
  return connectionParts;
}
Program: 121926
Project: 121926
Buggy source:
public static List<ConnectionPart> getConnectionParts(ProcessPart processPart,Point point,Node node){
  List<ConnectionPart> connectionParts=new ArrayList<ConnectionPart>();
  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 && canCreateNodeOnLink((Connection)((ConnectionPart)conn).getModel(),node)) {
                  ConnectionPart connPart=(ConnectionPart)conn;
                  if (connPart.getFigure() != null && connPart.getFigure().getBounds().contains(point)) {
                    connectionParts.add((ConnectionPart)conn);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  return connectionParts;
}

Fixed version (ground truth):
public static List<ConnectionPart> getConnectionParts(ProcessPart processPart,Point point,Node node){
  List<ConnectionPart> connectionParts=new ArrayList<ConnectionPart>();
  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 && canCreateNodeOnLink((Connection)((ConnectionPart)conn).getModel(),node)) {
                  ConnectionPart connPart=(ConnectionPart)conn;
                  connectionParts.add((ConnectionPart)conn);
                }
              }
            }
          }
        }
      }
    }
  }
  return connectionParts;
}
Program: 121930
Project: 121930
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: 121931
Project: 121931
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: 121932
Project: 121932
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: 121933
Project: 121933
Buggy source:
private void createSendboxProject(){
  if (getConnection() != null) {
    setRepositoryContextInContext();
  }
  CreateSandboxProjectDialog sandboxDialog=new CreateSandboxProjectDialog(getShell(),getConnection());
  if (sandboxDialog.open() == Window.OK) {
    ConnectionUserPerReader instance=ConnectionUserPerReader.getInstance();
    this.storedConnections=instance.forceReadConnections();
    this.lastConnection=sandboxDialog.getConnectionBean().getName();
    PreferenceManipulator prefManipulator=new PreferenceManipulator(CorePlugin.getDefault().getPreferenceStore());
    prefManipulator.saveConnections(this.storedConnections);
    perReader.saveConnections(this.storedConnections);
    fillContents();
  }
  try {
    setStatusArea();
  }
 catch (  PersistenceException e1) {
    ExceptionHandler.process(e1);
  }
  if (getConnection() != null) {
    setRepositoryContextInContext();
  }
}

Fixed version (ground truth):
private void createSendboxProject(){
  if (getConnection() != null) {
    setRepositoryContextInContext();
  }
  CreateSandboxProjectDialog sandboxDialog=new CreateSandboxProjectDialog(getShell(),getConnection());
  if (sandboxDialog.open() == Window.OK) {
    ConnectionUserPerReader instance=ConnectionUserPerReader.getInstance();
    this.storedConnections=instance.forceReadConnections();
    this.lastConnection=sandboxDialog.getConnectionBean().getName();
    perReader.saveConnections(this.storedConnections);
    fillContents();
  }
  try {
    setStatusArea();
  }
 catch (  PersistenceException e1) {
    ExceptionHandler.process(e1);
  }
  if (getConnection() != null) {
    setRepositoryContextInContext();
  }
}
Program: 121936
Project: 121936
Buggy source:
public void widgetSelected(SelectionEvent e){
  ImportDemoProjectAction action=ImportDemoProjectAction.getInstance();
  action.setShell(getShell());
  action.run();
  refresh();
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent e){
  ImportDemoProjectAction action=ImportDemoProjectAction.getInstance();
  action.setShell(getShell());
  action.run();
  refresh();
}
Program: 121937
Project: 121937
Buggy source:
private void refresh(){
  ProxyRepositoryFactory repositoryFactory=ProxyRepositoryFactory.getInstance();
  Project[] projects=null;
  try {
    projects=repositoryFactory.readProject();
  }
 catch (  PersistenceException e1) {
    ExceptionHandler.process(e1);
  }
catch (  BusinessException e1) {
    ExceptionHandler.process(e1);
  }
  this.projectListViewer.getList().removeAll();
  projectsMap.clear();
  if (projects != null) {
    for (int i=0; i < projects.length; i++) {
      Project pro=projects[i];
      convertorMapper.put(pro.getTechnicalLabel(),pro.getLabel());
      projectsMap.put(pro.getTechnicalLabel(),pro);
      enableOpenAndDelete(true);
    }
    this.projectListViewer.setInput(new ArrayList(convertorMapper.values()));
  }
  try {
    setStatusArea();
  }
 catch (  PersistenceException e1) {
    ExceptionHandler.process(e1);
  }
}

Fixed version (ground truth):
private void refresh(){
  ProxyRepositoryFactory repositoryFactory=ProxyRepositoryFactory.getInstance();
  Project[] projects=null;
  try {
    projects=repositoryFactory.readProject();
  }
 catch (  PersistenceException e1) {
    ExceptionHandler.process(e1);
  }
catch (  BusinessException e1) {
    ExceptionHandler.process(e1);
  }
  this.projectListViewer.getList().removeAll();
  projectsMap.clear();
  if (projects != null) {
    for (    Project pro : projects) {
      convertorMapper.put(pro.getTechnicalLabel(),pro.getLabel());
      projectsMap.put(pro.getTechnicalLabel(),pro);
      enableOpenAndDelete(true);
    }
    this.projectListViewer.setInput(new ArrayList(convertorMapper.values()));
  }
  try {
    setStatusArea();
  }
 catch (  PersistenceException e1) {
    ExceptionHandler.process(e1);
  }
}
Program: 121939
Project: 121939
Buggy source:
private void createSendboxProject(){
  if (getConnection() != null) {
    setRepositoryContextInContext();
  }
  CreateSandboxProjectDialog sandboxDialog=new CreateSandboxProjectDialog(getShell(),getConnection());
  if (sandboxDialog.open() == Window.OK) {
    ConnectionUserPerReader instance=ConnectionUserPerReader.getInstance();
    this.storedConnections=instance.forceReadConnections();
    this.lastConnection=sandboxDialog.getConnectionBean().getName();
    PreferenceManipulator prefManipulator=new PreferenceManipulator(CorePlugin.getDefault().getPreferenceStore());
    prefManipulator.saveConnections(this.storedConnections);
    perReader.saveConnections(this.storedConnections);
    fillContents();
  }
  try {
    setStatusArea();
  }
 catch (  PersistenceException e1) {
    ExceptionHandler.process(e1);
  }
  if (getConnection() != null) {
    setRepositoryContextInContext();
  }
}

Fixed version (ground truth):
private void createSendboxProject(){
  if (getConnection() != null) {
    setRepositoryContextInContext();
  }
  CreateSandboxProjectDialog sandboxDialog=new CreateSandboxProjectDialog(getShell(),getConnection());
  if (sandboxDialog.open() == Window.OK) {
    ConnectionUserPerReader instance=ConnectionUserPerReader.getInstance();
    this.storedConnections=instance.forceReadConnections();
    this.lastConnection=sandboxDialog.getConnectionBean().getName();
    perReader.saveConnections(this.storedConnections);
    fillContents();
  }
  try {
    setStatusArea();
  }
 catch (  PersistenceException e1) {
    ExceptionHandler.process(e1);
  }
  if (getConnection() != null) {
    setRepositoryContextInContext();
  }
}
Program: 121943
Project: 121943
Buggy source:
protected File getExternalComponentsLocation(){
  IPreferenceStore prefStore=CodeGeneratorActivator.getDefault().getPreferenceStore();
  String path=prefStore.getString(IComponentPreferenceConstant.USER_COMPONENTS_FOLDER);
  return (path == null || path.length() == 0 ? null : new File(path));
}

Fixed version (ground truth):
@Override protected File getExternalComponentsLocation(){
  IPreferenceStore prefStore=CodeGeneratorActivator.getDefault().getPreferenceStore();
  String path=prefStore.getString(IComponentPreferenceConstant.USER_COMPONENTS_FOLDER);
  return (path == null || path.length() == 0 ? null : new File(path));
}
Program: 121945
Project: 121945
Buggy source:
public boolean accept(File pathname){
  if (pathname.getName().equals("String_Node_Str")) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean accept(File pathname){
  if (pathname.getName().equals("String_Node_Str")) {
    return false;
  }
  return true;
}
Program: 121947
Project: 121947
Buggy source:
public void dragEnter(final DropTargetEvent event){
}

Fixed version (ground truth):
@Override public void dragEnter(final DropTargetEvent event){
}
Program: 121953
Project: 121953
Buggy source:
public void widgetDisposed(DisposeEvent e){
  if (res != null && !res.isDisposed()) {
    res.dispose();
  }
  parent.removeDisposeListener(this);
}

Fixed version (ground truth):
@Override public void widgetDisposed(DisposeEvent e){
  if (res != null && !res.isDisposed()) {
    res.dispose();
  }
  parent.removeDisposeListener(this);
}
Program: 121954
Project: 121954
Buggy source:
public void focusGained(FocusEvent event){
  focusGainedExecute((Control)event.widget);
}

Fixed version (ground truth):
@Override public void focusGained(FocusEvent event){
  focusGainedExecute((Control)event.widget);
}
Program: 121955
Project: 121955
Buggy source:
public void keyPressed(KeyEvent event){
  Control control=(Control)event.widget;
  resetErrorState(control);
}

Fixed version (ground truth):
@Override public void keyPressed(KeyEvent event){
  Control control=(Control)event.widget;
  resetErrorState(control);
}