nus-yam/ex-repair huggingface dataset:
Program: 118249
Project: 118249
Buggy source:
private void exportJobForPOJO(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  File tmpJob=null;
  try {
    tmpJob=File.createTempFile("String_Node_Str","String_Node_Str",null);
    exportChoiceMap.put(ExportChoice.binaries,true);
    exportChoiceMap.put(ExportChoice.includeLibs,true);
    exportChoiceMap.put(ExportChoice.addStatistics,true);
    ProcessItem processItem=(ProcessItem)node.getObject().getProperty().getItem();
    BuildJobManager.getInstance().buildJob(tmpJob.getAbsolutePath(),processItem,jobVersion,processItem.getProcess().getDefaultContext(),exportChoiceMap,exportType,monitor);
    if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
      IRunProcessService service=(IRunProcessService)GlobalServiceRegister.getDefault().getService(IRunProcessService.class);
      boolean hasError=service.checkExportProcess(new StructuredSelection(node),true);
      if (hasError) {
        return;
      }
    }
    monitor.beginTask("String_Node_Str",IProgressMonitor.UNKNOWN);
    FeaturesModel featuresModel=getFeatureModel(tmpJob);
    process(processItem,featuresModel,monitor);
  }
 catch (  InterruptedException e) {
    throw e;
  }
catch (  Exception e) {
    throw new InvocationTargetException(e);
  }
 finally {
    if (tmpJob != null && tmpJob.exists()) {
      tmpJob.delete();
    }
  }
}

Fixed version (ground truth):
private void exportJobForPOJO(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  File tmpJob=null;
  try {
    tmpJob=File.createTempFile("String_Node_Str","String_Node_Str",null);
    exportChoiceMap.put(ExportChoice.binaries,true);
    exportChoiceMap.put(ExportChoice.includeLibs,true);
    exportChoiceMap.put(ExportChoice.addStatistics,true);
    ProcessItem processItem=(ProcessItem)node.getObject().getProperty().getItem();
    String contextName=(String)exportChoiceMap.get(ExportChoice.contextName);
    if (contextName == null) {
      contextName=processItem.getProcess().getDefaultContext();
    }
    BuildJobManager.getInstance().buildJob(tmpJob.getAbsolutePath(),processItem,jobVersion,contextName,exportChoiceMap,exportType,monitor);
    if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
      IRunProcessService service=(IRunProcessService)GlobalServiceRegister.getDefault().getService(IRunProcessService.class);
      boolean hasError=service.checkExportProcess(new StructuredSelection(node),true);
      if (hasError) {
        return;
      }
    }
    monitor.beginTask("String_Node_Str",IProgressMonitor.UNKNOWN);
    FeaturesModel featuresModel=getFeatureModel(tmpJob);
    process(processItem,featuresModel,monitor);
  }
 catch (  InterruptedException e) {
    throw e;
  }
catch (  Exception e) {
    throw new InvocationTargetException(e);
  }
 finally {
    if (tmpJob != null && tmpJob.exists()) {
      tmpJob.delete();
    }
  }
}
Program: 118250
Project: 118250
Buggy source:
protected boolean buildJobWithMaven(JobExportType jobExportType,IProgressMonitor monitor){
  String context=(contextCombo == null || contextCombo.isDisposed()) ? IContext.DEFAULT : contextCombo.getText();
  try {
    String destination=getDestinationValue();
    int separatorIndex=destination.lastIndexOf(File.separator);
    if (separatorIndex == -1) {
      String userDir=System.getProperty("String_Node_Str");
      destination=userDir + File.separator + destination;
    }
    Map<ExportChoice,Object> exportChoiceMap=getExportChoiceMap();
    exportChoiceMap.put(ExportChoice.addStatistics,Boolean.TRUE);
    return BuildJobManager.getInstance().buildJobs(destination,Arrays.asList(getCheckNodes()),getSelectedJobVersion(),context,exportChoiceMap,jobExportType,monitor);
  }
 catch (  Exception e) {
    MessageBoxExceptionHandler.process(e,getShell());
    return false;
  }
}

Fixed version (ground truth):
protected boolean buildJobWithMaven(JobExportType jobExportType,IProgressMonitor monitor){
  String context=(contextCombo == null || contextCombo.isDisposed()) ? processItem.getProcess().getDefaultContext() : contextCombo.getText();
  try {
    String destination=getDestinationValue();
    int separatorIndex=destination.lastIndexOf(File.separator);
    if (separatorIndex == -1) {
      String userDir=System.getProperty("String_Node_Str");
      destination=userDir + File.separator + destination;
    }
    Map<ExportChoice,Object> exportChoiceMap=getExportChoiceMap();
    exportChoiceMap.put(ExportChoice.addStatistics,Boolean.TRUE);
    return BuildJobManager.getInstance().buildJobs(destination,Arrays.asList(getCheckNodes()),getSelectedJobVersion(),context,exportChoiceMap,jobExportType,monitor);
  }
 catch (  Exception e) {
    MessageBoxExceptionHandler.process(e,getShell());
    return false;
  }
}
Program: 118251
Project: 118251
Buggy source:
/** 
 * DOC nrousseau AbstractRepositoryController constructor comment.
 * @param dp
 */
public AbstractRepositoryController(IDynamicProperty dp){
  super(dp);
}

Fixed version (ground truth):
/** 
 * DOC nrousseau AbstractRepositoryController constructor comment.
 * @param dp
 */
public AbstractRepositoryController(IDynamicProperty dp){
  super(dp);
  repositoryValueHander=new ControllerRepositoryValueHander();
}
Program: 118252
Project: 118252
Buggy source:
protected String getDisplayNameFromValue(IElementParameter param,String value){
  int index=param.getIndexOfItemFromList(value);
  IElementParameter infoObjectParam=param.getElement().getElementParameter("String_Node_Str");
  if (infoObjectParam != null && infoObjectParam.getValue() != null) {
    index=-1;
  }
  if (index == -1) {
    fastInitializeRepositoryNames(param);
    if (param.getListItemsDisplayName().length == 0) {
      return "String_Node_Str";
    }
    index=param.getIndexOfItemFromList(value);
    if (index == -1) {
      return "String_Node_Str";
    }
  }
  return param.getListItemsDisplayName()[index];
}

Fixed version (ground truth):
protected String getDisplayNameFromValue(IElementParameter param,String value){
  return repositoryValueHander.getDisplayNameFromValue(param,value);
}
Program: 118268
Project: 118268
Buggy source:
protected boolean buildJobWithMaven(JobExportType jobExportType,IProgressMonitor monitor){
  String context=(contextCombo == null || contextCombo.isDisposed()) ? IContext.DEFAULT : contextCombo.getText();
  try {
    String destination=getDestinationValue();
    int separatorIndex=destination.lastIndexOf(File.separator);
    if (separatorIndex == -1) {
      String userDir=System.getProperty("String_Node_Str");
      destination=userDir + File.separator + destination;
    }
    return BuildJobManager.getInstance().buildJobs(destination,Arrays.asList(getCheckNodes()),getSelectedJobVersion(),context,getExportChoiceMap(),jobExportType,monitor);
  }
 catch (  Exception e) {
    MessageBoxExceptionHandler.process(e,getShell());
    return false;
  }
}

Fixed version (ground truth):
protected boolean buildJobWithMaven(JobExportType jobExportType,IProgressMonitor monitor){
  String context=(contextCombo == null || contextCombo.isDisposed()) ? IContext.DEFAULT : contextCombo.getText();
  try {
    String destination=getDestinationValue();
    int separatorIndex=destination.lastIndexOf(File.separator);
    if (separatorIndex == -1) {
      String userDir=System.getProperty("String_Node_Str");
      destination=userDir + File.separator + destination;
    }
    Map<ExportChoice,Object> exportChoiceMap=getExportChoiceMap();
    exportChoiceMap.put(ExportChoice.addStatistics,Boolean.TRUE);
    return BuildJobManager.getInstance().buildJobs(destination,Arrays.asList(getCheckNodes()),getSelectedJobVersion(),context,exportChoiceMap,jobExportType,monitor);
  }
 catch (  Exception e) {
    MessageBoxExceptionHandler.process(e,getShell());
    return false;
  }
}
Program: 118269
Project: 118269
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((ComponentProperties)form.getProperties(),form.getName());
  }
  resetParameters();
}

Fixed version (ground truth):
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());
  }
}
Program: 118270
Project: 118270
Buggy source:
public TableEntryLocation[] parseTableEntryLocations(String expression){
  resultList.clear();
  if (expression != null) {
    matcher.setMultiline(true);
    if (patternMatcherInput == null) {
      patternMatcherInput=new PatternMatcherInput(expression);
    }
 else {
      patternMatcherInput.setInput(expression);
    }
    recompilePatternIfNecessary(EXPRESSION_PATTERN);
    while (matcher.contains(patternMatcherInput,pattern)) {
      MatchResult matchResult=matcher.getMatch();
      if (matchResult.group(5) != null) {
        TableEntryLocation location=new TableEntryLocation(matchResult.group(6),matchResult.group(7));
        resultList.add(location);
      }
 else       if (matchResult.group(1) != null) {
        TableEntryLocation location=new TableEntryLocation(matchResult.group(2) + "String_Node_Str" + matchResult.group(3),matchResult.group(4));
        resultList.add(location);
      }
    }
  }
  return resultList.toArray(new TableEntryLocation[resultList.size()]);
}

Fixed version (ground truth):
public TableEntryLocation[] parseTableEntryLocations(String expression){
  resultList.clear();
  if (expression != null) {
    matcher.setMultiline(true);
    if (patternMatcherInput == null) {
      patternMatcherInput=new PatternMatcherInput(expression);
    }
 else {
      patternMatcherInput.setInput(expression);
    }
    recompilePatternIfNecessary(EXPRESSION_PATTERN);
    while (matcher.contains(patternMatcherInput,pattern)) {
      MatchResult matchResult=matcher.getMatch();
      TableEntryLocation location=null;
      if (matchResult.group(1) != null) {
        location=new TableEntryLocation(matchResult.group(2) + DOT_STR + matchResult.group(3)+ DOT_STR+ matchResult.group(4)+ DOT_STR+ matchResult.group(5),matchResult.group(6));
      }
 else       if (matchResult.group(7) != null) {
        location=new TableEntryLocation(matchResult.group(8) + DOT_STR + matchResult.group(9)+ DOT_STR+ matchResult.group(10),matchResult.group(11));
      }
 else       if (matchResult.group(12) != null) {
        location=new TableEntryLocation(matchResult.group(13) + DOT_STR + matchResult.group(14),matchResult.group(15));
      }
 else       if (matchResult.group(16) != null) {
        location=new TableEntryLocation(matchResult.group(17),matchResult.group(18));
      }
      if (location != null) {
        resultList.add(location);
      }
    }
  }
  return resultList.toArray(new TableEntryLocation[resultList.size()]);
}
Program: 118274
Project: 118274
Buggy source:
/** 
 * export the sected TOS model elements to the destination
 * @param destination zip file or folder to store the exported elements
 * @param items, the items to be exported
 * @param exportAllVersions whether all the versions are export or only the selected once
 * @param progressMonitor, to show the progress during export
 * @throws Exception in case of problem
 */
public void exportItems(File destination,final Collection<Item> items,boolean exportAllVersions,IProgressMonitor progressMonitor) throws Exception {
  Collection<Item> workItems=items;
  if (workItems == null) {
    workItems=new ArrayList<Item>();
  }
  Collection<Item> otherVersions=new ArrayList<Item>();
  if (exportAllVersions) {
    otherVersions=getOtherVersions(workItems);
    workItems.addAll(otherVersions);
    otherVersions.clear();
  }
  try {
    File tmpDirectory=null;
    Map<File,IPath> toExport;
    File parentDesFile=checkAndGetDesParentFile(destination);
    if (destination.getName().endsWith(FileConstants.TAR_FILE_SUFFIX)) {
      createFolder(parentDesFile);
      exporter=new TarFileExporterFullPath(destination.getAbsolutePath(),false);
    }
 else     if (destination.getName().endsWith(FileConstants.TAR_GZ_FILE_SUFFIX)) {
      createFolder(parentDesFile);
      exporter=new TarFileExporterFullPath(destination.getAbsolutePath(),true);
    }
 else     if (destination.getName().endsWith(FileConstants.ZIP_FILE_SUFFIX)) {
      createFolder(parentDesFile);
      exporter=new ZipFileExporterFullPath(destination.getAbsolutePath(),true);
    }
 else {
      createFolder(destination);
    }
    if (exporter != null) {
      tmpDirectory=createTmpDirectory();
    }
    try {
      if (exporter != null) {
        toExport=exportItems2(workItems,tmpDirectory,true,progressMonitor);
        for (        File file : toExport.keySet()) {
          IPath path=toExport.get(file);
          exporter.write(file.getAbsolutePath(),path.toString());
        }
      }
 else {
        toExport=exportItems2(workItems,destination,true,progressMonitor);
      }
    }
 catch (    Exception e) {
      throw e;
    }
 finally {
      if (exporter != null) {
        deleteTmpDirectory(tmpDirectory);
      }
    }
  }
  finally {
    if (exporter != null) {
      try {
        exporter.finished();
      }
 catch (      Exception e) {
        ExceptionHandler.process(e);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * export the sected TOS model elements to the destination
 * @param destination zip file or folder to store the exported elements
 * @param items, the items to be exported
 * @param exportAllVersions whether all the versions are export or only the selected once
 * @param progressMonitor, to show the progress during export
 * @throws Exception in case of problem
 */
public void exportItems(File destination,final Collection<Item> items,boolean exportAllVersions,IProgressMonitor progressMonitor) throws Exception {
  exportItems(destination,items,null,exportAllVersions,progressMonitor);
}
Program: 118277
Project: 118277
Buggy source:
protected String getRepositoryItemFromRepositoryName(IElementParameter param,String repositoryName){
  String value=(String)param.getValue();
  Object[] valuesList=param.getListItemsValue();
  String[] originalList=param.getListItemsDisplayCodeName();
  for (int i=0; i < valuesList.length; i++) {
    if (valuesList[i].equals(value)) {
      if ("String_Node_Str".equals(repositoryName) || HiveConstant.DISTRIBUTION_PARAMETER.equals(repositoryName) || HiveConstant.VERSION_PARAMETER.equals(repositoryName)) {
        return valuesList[i].toString();
      }
      return originalList[i];
    }
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
protected String getRepositoryItemFromRepositoryName(IElementParameter param,String repositoryName){
  String value=(String)param.getValue();
  Object[] valuesList=param.getListItemsValue();
  String[] originalList=param.getListItemsDisplayCodeName();
  for (int i=0; i < valuesList.length; i++) {
    if (valuesList[i].equals(value)) {
      if ("String_Node_Str".equals(repositoryName) || HiveConstant.DISTRIBUTION_PARAMETER.equals(repositoryName) || HiveConstant.VERSION_PARAMETER.equals(repositoryName)|| ImpalaConstant.DISTRIBUTION_PARAMETER.equals(repositoryName)|| ImpalaConstant.VERSION_PARAMETER.equals(repositoryName)) {
        return valuesList[i].toString();
      }
      return originalList[i];
    }
  }
  return "String_Node_Str";
}
Program: 118280
Project: 118280
Buggy source:
@Override public void init(TreeViewer viewer,IStructuredSelection selection){
  boolean canWork=!selection.isEmpty() && selection.size() == 1;
  if (canWork) {
    Object o=selection.getFirstElement();
    repositoryNode=(RepositoryNode)o;
switch (repositoryNode.getType()) {
case REPOSITORY_ELEMENT:
      if (repositoryNode.getObject().getRepositoryStatus() == ERepositoryStatus.DELETED) {
        canWork=false;
      }
    if (repositoryNode.getObjectType() != ERepositoryObjectType.METADATA_CONNECTIONS && repositoryNode.getObjectType() != ERepositoryObjectType.METADATA_CON_QUERY) {
      canWork=false;
    }
  if (canWork) {
    if (isUnderDBConnection(repositoryNode)) {
      DatabaseConnectionItem item=(DatabaseConnectionItem)repositoryNode.getObject().getProperty().getItem();
      DatabaseConnection dbConn=(DatabaseConnection)item.getConnection();
      String dbType=dbConn.getDatabaseType();
      if (EDatabaseTypeName.HIVE.getXmlName().equalsIgnoreCase(dbType) || EDatabaseTypeName.HBASE.getXmlName().equalsIgnoreCase(dbType)) {
        canWork=false;
        break;
      }
    }
  }
break;
default :
canWork=false;
}
if (canWork && !isLastVersion(repositoryNode)) {
canWork=false;
}
}
setEnabled(canWork);
}

Fixed version (ground truth):
@Override public void init(TreeViewer viewer,IStructuredSelection selection){
  boolean canWork=!selection.isEmpty() && selection.size() == 1;
  if (canWork) {
    Object o=selection.getFirstElement();
    repositoryNode=(RepositoryNode)o;
switch (repositoryNode.getType()) {
case REPOSITORY_ELEMENT:
      if (repositoryNode.getObject().getRepositoryStatus() == ERepositoryStatus.DELETED) {
        canWork=false;
      }
    if (repositoryNode.getObjectType() != ERepositoryObjectType.METADATA_CONNECTIONS && repositoryNode.getObjectType() != ERepositoryObjectType.METADATA_CON_QUERY) {
      canWork=false;
    }
  if (canWork) {
    if (isUnderDBConnection(repositoryNode)) {
      DatabaseConnectionItem item=(DatabaseConnectionItem)repositoryNode.getObject().getProperty().getItem();
      DatabaseConnection dbConn=(DatabaseConnection)item.getConnection();
      String dbType=dbConn.getDatabaseType();
      if (EDatabaseTypeName.HIVE.getXmlName().equalsIgnoreCase(dbType) || EDatabaseTypeName.HBASE.getXmlName().equalsIgnoreCase(dbType) || EDatabaseTypeName.IMPALA.getXmlName().equalsIgnoreCase(dbType)) {
        canWork=false;
        break;
      }
    }
  }
break;
default :
canWork=false;
}
if (canWork && !isLastVersion(repositoryNode)) {
canWork=false;
}
}
setEnabled(canWork);
}
Program: 118284
Project: 118284
Buggy source:
/** 
 * Gets system routine.
 * @param needSystemRoutine
 * @return
 */
protected List<URL> getSystemRoutine(ExportFileResource[] process){
  try {
    List<String> include=new ArrayList<String>();
    include.add(SYSTEM_ROUTINES_PATH);
    if (needMappingInSystemRoutine) {
      include.add(JavaUtils.JAVA_XML_MAPPING);
      if (GlobalServiceRegister.getDefault().isServiceRegistered(ICoreService.class)) {
        ICoreService coreService=(ICoreService)GlobalServiceRegister.getDefault().getService(ICoreService.class);
        coreService.synchronizeMapptingXML();
      }
    }
    File jarFile=new File(getTmpFolder() + File.separatorChar + SYSTEMROUTINE_JAR);
    File classRootFileLocation=getClassRootFileLocation();
    if (classRootFileLocation == null) {
      return Collections.emptyList();
    }
    JarBuilder jarbuilder=new JarBuilder(classRootFileLocation,jarFile);
    jarbuilder.setIncludeDir(include);
    jarbuilder.setIncludeRoutines(getRoutineDependince(process,true,USER_ROUTINES_PATH));
    jarbuilder.buildJar();
    return Collections.singletonList(jarFile.toURI().toURL());
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
    return Collections.emptyList();
  }
}

Fixed version (ground truth):
/** 
 * Gets system routine.
 * @param needSystemRoutine
 * @return
 */
protected List<URL> getSystemRoutine(ExportFileResource[] process){
  try {
    List<String> include=new ArrayList<String>();
    include.add(SYSTEM_ROUTINES_PATH);
    if (needMappingInSystemRoutine) {
      include.add(JavaUtils.JAVA_XML_MAPPING);
      if (GlobalServiceRegister.getDefault().isServiceRegistered(ICoreService.class)) {
        ICoreService coreService=(ICoreService)GlobalServiceRegister.getDefault().getService(ICoreService.class);
        coreService.synchronizeMapptingXML();
        coreService.syncLog4jSettings();
      }
    }
    File jarFile=new File(getTmpFolder() + File.separatorChar + SYSTEMROUTINE_JAR);
    File classRootFileLocation=getClassRootFileLocation();
    if (classRootFileLocation == null) {
      return Collections.emptyList();
    }
    JarBuilder jarbuilder=new JarBuilder(classRootFileLocation,jarFile);
    jarbuilder.setIncludeDir(include);
    jarbuilder.setIncludeRoutines(getRoutineDependince(process,true,USER_ROUTINES_PATH));
    jarbuilder.buildJar();
    return Collections.singletonList(jarFile.toURI().toURL());
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
    return Collections.emptyList();
  }
}
Program: 118286
Project: 118286
Buggy source:
@Override public void updateLogFiles(IProject project,boolean isLogForJob){
  ITalendProcessJavaProject talendJavaProject=JavaProcessorUtilities.getTalendJavaProject();
  if (talendJavaProject == null) {
    return;
  }
  try {
    IFolder resFolder=talendJavaProject.getResourcesFolder();
    IFile log4jFile=resFolder.getFile(Log4jPrefsConstants.LOG4J_FILE_NAME);
    if (!Log4jPrefsSettingManager.getInstance().isLog4jPrefsExist()) {
      Log4jPrefsSettingManager.getInstance().createTalendLog4jPrefs(Log4jPrefsConstants.LOG4J_ENABLE_NODE,Log4jUtil.isEnable() ? Boolean.TRUE.toString() : Boolean.FALSE.toString());
      Log4jPrefsSettingManager.getInstance().createTalendLog4jPrefs(Log4jPrefsConstants.LOG4J_CONTENT_NODE,getLogTemplate(RESOURCE_LOG_FILE_PATH));
      Log4jPrefsSettingManager.getInstance().createTalendLog4jPrefs(Log4jPrefsConstants.COMMON_LOGGING_NODE,getLogTemplate(RESOURCE_COMMONLOG_FILE_PATH));
    }
    String log4jStr=getTemplateStrFromPreferenceStore(Log4jPrefsConstants.LOG4J_CONTENT_NODE);
    if (log4jStr != null) {
      File ljFile=new File(log4jFile.getLocation().toOSString());
      FileOutputStream ljFileOutputStream=null;
      try {
        ljFileOutputStream=new FileOutputStream(ljFile);
        ljFileOutputStream.write(log4jStr.getBytes());
      }
  finally {
        ljFileOutputStream.close();
      }
      resFolder.refreshLocal(IResource.DEPTH_ONE,null);
    }
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
}

Fixed version (ground truth):
@Override public void updateLogFiles(IProject project,boolean isLogForJob){
  ITalendProcessJavaProject talendJavaProject=JavaProcessorUtilities.getTalendJavaProject();
  if (talendJavaProject == null) {
    return;
  }
  try {
    IFolder resFolder=talendJavaProject.getResourcesFolder();
    IFile log4jFile=resFolder.getFile(Log4jPrefsConstants.LOG4J_FILE_NAME);
    if (!Log4jPrefsSettingManager.getInstance().isLog4jPrefsExist()) {
      Log4jPrefsSettingManager.getInstance().createTalendLog4jPrefs(Log4jPrefsConstants.LOG4J_ENABLE_NODE,Log4jUtil.isEnable() ? Boolean.TRUE.toString() : Boolean.FALSE.toString());
      Log4jPrefsSettingManager.getInstance().createTalendLog4jPrefs(Log4jPrefsConstants.LOG4J_CONTENT_NODE,getLogTemplate(RESOURCE_LOG_FILE_PATH));
      Log4jPrefsSettingManager.getInstance().createTalendLog4jPrefs(Log4jPrefsConstants.COMMON_LOGGING_NODE,getLogTemplate(RESOURCE_COMMONLOG_FILE_PATH));
    }
    String log4jStr=getTemplateStrFromPreferenceStore(Log4jPrefsConstants.LOG4J_CONTENT_NODE);
    if (log4jStr != null) {
      File ljFile=new File(log4jFile.getLocation().toOSString());
      FileOutputStream ljFileOutputStream=null;
      try {
        ljFile.getParentFile().mkdirs();
        ljFileOutputStream=new FileOutputStream(ljFile);
        ljFileOutputStream.write(log4jStr.getBytes());
      }
  finally {
        if (ljFileOutputStream != null) {
          ljFileOutputStream.close();
        }
      }
      resFolder.refreshLocal(IResource.DEPTH_ONE,null);
    }
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
}
Program: 118287
Project: 118287
Buggy source:
public QueryGuessCommand(INode node2,IMetadataTable metadataTable,String schema,String dbType,Connection conn){
  this(node2,metadataTable);
  this.schema=schema;
  this.dbType=dbType;
  this.conn=conn;
}

Fixed version (ground truth):
public QueryGuessCommand(INode node2,IMetadataTable metadataTable,String schema,String dbType,Connection conn){
  this(node2,metadataTable);
  if (!"String_Node_Str".equals(schema)) {
    this.schema=schema;
  }
  this.dbType=dbType;
  this.conn=conn;
}
Program: 118289
Project: 118289
Buggy source:
@Override protected boolean isPasswordParam(IElementParameter parameter){
  return true;
}

Fixed version (ground truth):
@Override protected boolean isPasswordParam(IElementParameter parameter){
  if (ContextParameterUtils.containContextVariables(String.valueOf(parameter.getValue()))) {
    return false;
  }
  return true;
}
Program: 118290
Project: 118290
Buggy source:
@Override public Control createControl(Composite subComposite,IElementParameter param,int numInRow,int nbInRow,int top,Control lastControl){
  Control lastControlUsed=super.createControl(subComposite,param,numInRow,nbInRow,top,lastControl);
  if (labelText != null) {
    labelText.setEchoChar('*');
  }
  FormData data=(FormData)lastControlUsed.getLayoutData();
  if (!param.isRepositoryValueUsed() && !isInWizard()) {
    data.right=new FormAttachment((numInRow * MAX_PERCENT) / nbInRow,-STANDARD_BUTTON_WIDTH);
    lastControlUsed=addButton(subComposite,param,lastControlUsed,numInRow,nbInRow,top);
  }
  return lastControlUsed;
}

Fixed version (ground truth):
@Override public Control createControl(Composite subComposite,IElementParameter param,int numInRow,int nbInRow,int top,Control lastControl){
  Control lastControlUsed=super.createControl(subComposite,param,numInRow,nbInRow,top,lastControl);
  if (labelText != null && param != null && isPasswordParam(param)) {
    labelText.setEchoChar('*');
  }
  FormData data=(FormData)lastControlUsed.getLayoutData();
  if (!param.isRepositoryValueUsed() && !isInWizard()) {
    data.right=new FormAttachment((numInRow * MAX_PERCENT) / nbInRow,-STANDARD_BUTTON_WIDTH);
    lastControlUsed=addButton(subComposite,param,lastControlUsed,numInRow,nbInRow,top);
  }
  return lastControlUsed;
}
Program: 118291
Project: 118291
Buggy source:
protected static void addComponentsByNameFilter(final IComponentsFactory compFac,Set<IComponent> componentSet,String nameFilter){
  if (compFac == null || componentSet == null) {
    return;
  }
  if (nameFilter != null && !nameFilter.trim().isEmpty()) {
    Set<IComponent> components=compFac.getComponents();
    Iterator<IComponent> iter=components.iterator();
    String regex=getFilterRegex(nameFilter);
    while (iter.hasNext()) {
      IComponent xmlComponent=iter.next();
      if (!xmlComponent.getName().toLowerCase().matches(regex) && !xmlComponent.getLongName().toLowerCase().matches(regex)) {
        continue;
      }
 else {
        componentSet.add(xmlComponent);
      }
    }
  }
}

Fixed version (ground truth):
protected static void addComponentsByNameFilter(final IComponentsFactory compFac,Set<IComponent> componentSet,String nameFilter){
  if (compFac == null || componentSet == null) {
    return;
  }
  if (nameFilter != null && !nameFilter.trim().isEmpty()) {
    Set<IComponent> components=compFac.getComponents();
    Iterator<IComponent> iter=components.iterator();
    String regex=getFilterRegex(nameFilter);
    Pattern pattern=Pattern.compile(regex);
    Set<ComponentHit> resultByName=new LinkedHashSet<ComponentHit>();
    Set<ComponentHit> resultByLongName=new LinkedHashSet<ComponentHit>();
    while (iter.hasNext()) {
      IComponent xmlComponent=iter.next();
      Matcher matcher=pattern.matcher(xmlComponent.getName().toLowerCase());
      if (matcher.find()) {
        resultByName.add(new ComponentHit(xmlComponent,matcher.start()));
        continue;
      }
      matcher=pattern.matcher(xmlComponent.getLongName().toLowerCase());
      if (matcher.find()) {
        resultByLongName.add(new ComponentHit(xmlComponent,matcher.start()));
        continue;
      }
    }
    if (!resultByName.isEmpty()) {
      ComponentHit[] hitArray=resultByName.toArray(new ComponentHit[resultByName.size()]);
      Arrays.sort(hitArray);
      addComponents(componentSet,hitArray);
    }
    if (!resultByLongName.isEmpty()) {
      ComponentHit[] hitArray=resultByLongName.toArray(new ComponentHit[resultByLongName.size()]);
      Arrays.sort(hitArray);
      addComponents(componentSet,hitArray);
    }
  }
}
Program: 118293
Project: 118293
Buggy source:
@SuppressWarnings("String_Node_Str") @Override protected IStatus run(IProgressMonitor monitor){
  try {
    TalendPaletteSearchIndex searchIndex=TalendPaletteSearchIndex.getInstance();
    LocalSearchManager localSearchManager=BaseHelpSystem.getLocalSearchManager();
    localSearchManager.ensureIndexUpdated(monitor,searchIndex);
    ISearchQuery searchQuery=new SearchQuery(keyword,false,new ArrayList<String>(),Platform.getNL());
    searchIndex.search(searchQuery,new ISearchHitCollector(){
      @Override public void addQTCException(      QueryTooComplexException exception) throws QueryTooComplexException {
      }
      @Override public void addHits(      List<SearchHit> hits,      String wordsSearched){
        querySearchResult.addAll(hits);
      }
    }
);
  }
 catch (  Throwable e) {
    CommonExceptionHandler.process(e,Priority.WARN);
  }
  return Status.OK_STATUS;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override protected IStatus run(IProgressMonitor monitor){
  String helpKeyword=keyword;
  try {
    TalendPaletteSearchIndex searchIndex=TalendPaletteSearchIndex.getInstance();
    LocalSearchManager localSearchManager=BaseHelpSystem.getLocalSearchManager();
    localSearchManager.ensureIndexUpdated(monitor,searchIndex);
    final String WHITESPACE="String_Node_Str";
    helpKeyword=helpKeyword + WHITESPACE + "String_Node_Str"+ WHITESPACE+ helpKeyword+ "String_Node_Str";
    ISearchQuery searchQuery=new SearchQuery(helpKeyword,false,new ArrayList<String>(),Platform.getNL());
    searchIndex.search(searchQuery,new ISearchHitCollector(){
      @Override public void addQTCException(      QueryTooComplexException exception) throws QueryTooComplexException {
      }
      @Override public void addHits(      List<SearchHit> hits,      String wordsSearched){
        querySearchResult.addAll(hits);
      }
    }
);
  }
 catch (  Throwable e) {
    CommonExceptionHandler.process(e,Priority.WARN);
  }
  return Status.OK_STATUS;
}
Program: 118295
Project: 118295
Buggy source:
/** 
 * yzhang Comment method "getFilterRegex".
 * @return
 */
private static String getFilterRegex(String nameFilter){
  String regex="String_Node_Str" + nameFilter.replaceAll("String_Node_Str","String_Node_Str") + "String_Node_Str";
  regex=regex.replaceAll("String_Node_Str","String_Node_Str");
  regex=regex.replaceAll("String_Node_Str","String_Node_Str");
  regex=regex.replaceAll("String_Node_Str","String_Node_Str");
  try {
    Pattern.compile(regex);
  }
 catch (  Throwable e) {
    regex="String_Node_Str";
    CommonExceptionHandler.process(e,Priority.WARN);
  }
  return regex;
}

Fixed version (ground truth):
/** 
 * yzhang Comment method "getFilterRegex".
 * @return
 */
private static String getFilterRegex(String nameFilter){
  String regex=nameFilter.replaceAll("String_Node_Str","String_Node_Str");
  regex=regex.replaceAll("String_Node_Str","String_Node_Str");
  regex=regex.replaceAll("String_Node_Str","String_Node_Str");
  regex=regex.replaceAll("String_Node_Str","String_Node_Str");
  try {
    Pattern.compile(regex);
  }
 catch (  Throwable e) {
    regex="String_Node_Str";
    CommonExceptionHandler.process(e,Priority.WARN);
  }
  return regex;
}
Program: 118296
Project: 118296
Buggy source:
@Override public void generateItemFiles(boolean withDependencies,IProgressMonitor monitor) throws Exception {
  IFolder baseFolder=talendProcessJavaProject.getItemsFolder();
  baseFolder=baseFolder.getFolder(JavaResourcesHelper.getJobFolderName(processItem.getProperty().getLabel(),processItem.getProperty().getVersion()));
  if (baseFolder.exists()) {
    talendProcessJavaProject.cleanFolder(monitor,baseFolder);
  }
 else {
    baseFolder.create(true,true,null);
  }
  IFolder itemsFolder=baseFolder.getFolder("String_Node_Str");
  itemsFolder.create(true,true,monitor);
  List<Item> items=new ArrayList<Item>();
  items.add(processItem);
  ExportItemUtil exportItemUtil=new ExportItemUtil();
  if (withDependencies) {
    Collection<IRepositoryViewObject> allProcessDependencies=ProcessUtils.getAllProcessDependencies(items);
    for (    IRepositoryViewObject repositoryObject : allProcessDependencies) {
      items.add(repositoryObject.getProperty().getItem());
    }
  }
  if (isOptionChoosed(ExportChoice.needJobItem)) {
    File destination=new File(itemsFolder.getLocation().toFile().getAbsolutePath());
    exportItemUtil.setProjectNameAsLowerCase(isProjectNameLowerCase());
    exportItemUtil.exportItems(destination,new ArrayList<Item>(items),false,new NullProgressMonitor());
  }
  addDQDependencies(itemsFolder,items);
  addTDMDependencies(itemsFolder,items);
}

Fixed version (ground truth):
@Override public void generateItemFiles(boolean withDependencies,IProgressMonitor monitor) throws Exception {
  IFolder baseFolder=talendProcessJavaProject.getItemsFolder();
  baseFolder=baseFolder.getFolder(JavaResourcesHelper.getJobFolderName(processItem.getProperty().getLabel(),processItem.getProperty().getVersion()));
  if (baseFolder.exists()) {
    talendProcessJavaProject.cleanFolder(monitor,baseFolder);
  }
 else {
    baseFolder.create(true,true,null);
  }
  IFolder itemsFolder=baseFolder.getFolder("String_Node_Str");
  itemsFolder.create(true,true,monitor);
  List<Item> items=new ArrayList<Item>();
  items.add(processItem);
  ExportItemUtil exportItemUtil=new ExportItemUtil();
  if (withDependencies) {
    Collection<IRepositoryViewObject> allProcessDependencies=ProcessUtils.getAllProcessDependencies(items);
    for (    IRepositoryViewObject repositoryObject : allProcessDependencies) {
      items.add(repositoryObject.getProperty().getItem());
    }
  }
  if (isOptionChoosed(ExportChoice.executeTests)) {
    IPath path=talendProcessJavaProject.getTargetFolder().getFolder("String_Node_Str").getLocation();
    File reports=new File(path.toOSString());
    if (reports.exists()) {
      FilesUtils.deleteFolder(reports,false);
    }
  }
  if (isOptionChoosed(ExportChoice.needJobItem)) {
    File destination=new File(itemsFolder.getLocation().toFile().getAbsolutePath());
    exportItemUtil.setProjectNameAsLowerCase(isProjectNameLowerCase());
    exportItemUtil.exportItems(destination,new ArrayList<Item>(items),false,new NullProgressMonitor());
  }
  addDQDependencies(itemsFolder,items);
  addTDMDependencies(itemsFolder,items);
}
Program: 118297
Project: 118297
Buggy source:
protected Command createButtonCommand(final Button button){
  if (button.getData(NAME).equals(PASSWORD)) {
    InputDialog dlg=new InputDialog(button.getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),"String_Node_Str",null){
      @Override protected Control createDialogArea(      Composite parent){
        Control control=super.createDialogArea(parent);
        String paramName=(String)button.getData(PARAMETER_NAME);
        getText().setData(PARAMETER_NAME,paramName);
        editionControlHelper.register(paramName,getText());
        return control;
      }
    }
;
    if (dlg.open() == Window.OK) {
      String paramName=(String)button.getData(PARAMETER_NAME);
      elem.setPropertyValue(EParameterName.UPDATE_COMPONENTS.getName(),new Boolean(true));
      return new PropertyChangeCommand(elem,paramName,dlg.getValue());
    }
  }
  return null;
}

Fixed version (ground truth):
protected Command createButtonCommand(final Button button){
  if (button.getData(NAME).equals(PASSWORD)) {
    String paramName=(String)button.getData(PARAMETER_NAME);
    IElementParameter param=elem.getElementParameter(paramName);
    String initValue="String_Node_Str";
    if (param.getValue() != null && ContextParameterUtils.containContextVariables(param.getValue().toString())) {
      initValue=param.getValue().toString();
    }
    InputDialog dlg=new InputDialog(button.getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),initValue,null){
      @Override protected Control createDialogArea(      Composite parent){
        Control control=super.createDialogArea(parent);
        String paramName=(String)button.getData(PARAMETER_NAME);
        getText().setData(PARAMETER_NAME,paramName);
        editionControlHelper.register(paramName,getText());
        return control;
      }
    }
;
    if (dlg.open() == Window.OK) {
      elem.setPropertyValue(EParameterName.UPDATE_COMPONENTS.getName(),new Boolean(true));
      return new PropertyChangeCommand(elem,paramName,dlg.getValue());
    }
  }
  return null;
}
Program: 118301
Project: 118301
Buggy source:
public TabFolderEditors(Composite parent,int style,MapperManager mapperManager){
  super(parent,style);
  tabFolderEditors=this;
  this.mapperManager=mapperManager;
  createComponents();
}

Fixed version (ground truth):
public TabFolderEditors(Composite parent,int style,MapperManager mapperManager){
  this(parent,style,mapperManager,null);
}
Program: 118302
Project: 118302
Buggy source:
/** 
 * DOC amaumont Comment method "createMetadataEditor".
 */
private void createMetadataEditorTab(){
  CTabItem item=new CTabItem(tabFolderEditors,SWT.BORDER);
  item.setText(Messages.getString("String_Node_Str"));
  SashForm inOutMetaEditorContainer=new SashForm(tabFolderEditors,SWT.SMOOTH | SWT.HORIZONTAL | SWT.SHADOW_OUT);
  inOutMetaEditorContainer.setLayout(new RowLayout(SWT.HORIZONTAL));
  item.setControl(inOutMetaEditorContainer);
  CommandStack commandStack=mapperManager.getCommandStack();
  inputMetaEditor=new MetadataTableEditorView(inOutMetaEditorContainer,SWT.BORDER);
  inputMetaEditor.setShowDbTypeColumn(true,false,true);
  inputMetaEditor.setShowDbColumnName(true,false);
  inputMetaEditor.setShowPatternColumn(false);
  inputMetaEditor.setShowTalendTypeColumn(false);
  inputMetaEditor.initGraphicComponents();
  inputMetaEditor.getExtendedTableViewer().setCommandStack(commandStack);
  outputMetaEditor=new MetadataTableEditorView(inOutMetaEditorContainer,SWT.BORDER);
  outputMetaEditor.setShowDbTypeColumn(true,false,true);
  outputMetaEditor.setShowDbColumnName(true,false);
  outputMetaEditor.setShowTalendTypeColumn(false);
  outputMetaEditor.setShowPatternColumn(false);
  outputMetaEditor.initGraphicComponents();
  outputMetaEditor.getExtendedTableViewer().setCommandStack(commandStack);
}

Fixed version (ground truth):
/** 
 * DOC amaumont Comment method "createMetadataEditor".
 */
private void createMetadataEditorTab(){
  CTabItem item=new CTabItem(tabFolderEditors,SWT.BORDER);
  item.setText(Messages.getString("String_Node_Str"));
  SashForm inOutMetaEditorContainer=new SashForm(tabFolderEditors,SWT.SMOOTH | SWT.HORIZONTAL | SWT.SHADOW_OUT);
  inOutMetaEditorContainer.setLayout(new RowLayout(SWT.HORIZONTAL));
  item.setControl(inOutMetaEditorContainer);
  CommandStack commandStack=mapperManager.getCommandStack();
  inputMetaEditor=new MetadataTableEditorView(inOutMetaEditorContainer,SWT.BORDER);
  inputMetaEditor.setCurrentDbms(dbmsId);
  inputMetaEditor.setShowDbTypeColumn(true,false,true);
  inputMetaEditor.setShowDbColumnName(true,false);
  inputMetaEditor.setShowPatternColumn(false);
  inputMetaEditor.setShowTalendTypeColumn(false);
  inputMetaEditor.initGraphicComponents();
  inputMetaEditor.getExtendedTableViewer().setCommandStack(commandStack);
  outputMetaEditor=new MetadataTableEditorView(inOutMetaEditorContainer,SWT.BORDER);
  outputMetaEditor.setCurrentDbms(dbmsId);
  outputMetaEditor.setShowDbTypeColumn(true,false,true);
  outputMetaEditor.setShowDbColumnName(true,false);
  outputMetaEditor.setShowTalendTypeColumn(false);
  outputMetaEditor.setShowPatternColumn(false);
  outputMetaEditor.initGraphicComponents();
  outputMetaEditor.getExtendedTableViewer().setCommandStack(commandStack);
}
Program: 118307
Project: 118307
Buggy source:
protected List<URL> getLib(List<String> libs,Boolean needLib){
  List<URL> list=new ArrayList<URL>();
  if (!needLib) {
    return list;
  }
  try {
    org.talend.core.model.general.Project projecdddt=ProjectManager.getInstance().getCurrentProject();
    IProject fsProject=null;
    try {
      fsProject=ResourceUtils.getProject(projecdddt);
    }
 catch (    PersistenceException e2) {
      ExceptionHandler.process(e2);
    }
    IPath temPath=fsProject.getLocation().append(File.separator + "String_Node_Str");
    ILibraryManagerService repositoryBundleService=CorePlugin.getDefault().getRepositoryBundleService();
    if (repositoryBundleService != null) {
      repositoryBundleService.retrieve(libs,temPath.toString());
    }
    File file=temPath.toFile();
    File[] files=file.listFiles(new FilenameFilter(){
      @Override public boolean accept(      File dir,      String name){
        return name.toLowerCase().endsWith(FileConstants.JAR_FILE_SUFFIX) || name.toLowerCase().endsWith(FileConstants.PROPERTIES_FILE_SUFFIX) || name.toLowerCase().endsWith(FileConstants.ZIP_FILE_SUFFIX) ? true : false;
      }
    }
);
    for (    File tempFile : files) {
      try {
        if (libs.contains(tempFile.getName())) {
          list.add(tempFile.toURL());
        }
      }
 catch (      MalformedURLException e) {
        ExceptionHandler.process(e);
      }
    }
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
  return list;
}

Fixed version (ground truth):
protected List<URL> getLib(List<ModuleNeeded> libs,Boolean needLib){
  List<URL> list=new ArrayList<URL>();
  if (!needLib) {
    return list;
  }
  try {
    org.talend.core.model.general.Project projecdddt=ProjectManager.getInstance().getCurrentProject();
    IProject fsProject=null;
    try {
      fsProject=ResourceUtils.getProject(projecdddt);
    }
 catch (    PersistenceException e2) {
      ExceptionHandler.process(e2);
    }
    IPath temPath=fsProject.getLocation().append(File.separator + "String_Node_Str");
    ILibraryManagerService repositoryBundleService=CorePlugin.getDefault().getRepositoryBundleService();
    if (repositoryBundleService != null) {
      repositoryBundleService.retrieve(new HashSet<ModuleNeeded>(libs),temPath.toString(),true);
    }
    File file=temPath.toFile();
    File[] files=file.listFiles(new FilenameFilter(){
      @Override public boolean accept(      File dir,      String name){
        return name.toLowerCase().endsWith(FileConstants.JAR_FILE_SUFFIX) || name.toLowerCase().endsWith(FileConstants.PROPERTIES_FILE_SUFFIX) || name.toLowerCase().endsWith(FileConstants.ZIP_FILE_SUFFIX) ? true : false;
      }
    }
);
    Set<String> moduleNames=new HashSet<String>();
    for (    ModuleNeeded m : libs) {
      moduleNames.add(m.getModuleName());
    }
    for (    File tempFile : files) {
      try {
        if (moduleNames.contains(tempFile.getName())) {
          list.add(tempFile.toURL());
        }
      }
 catch (      MalformedURLException e) {
        ExceptionHandler.process(e);
      }
    }
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
  return list;
}
Program: 118310
Project: 118310
Buggy source:
public ServiceInfo buildserviceinformation(ServiceInfo serviceinfo) throws Exception {
  ServiceDiscoveryHelper sdh;
  if (serviceinfo.getAuthConfig() != null && serviceinfo.getWsdlUri().indexOf("String_Node_Str") == 0) {
    sdh=new ServiceDiscoveryHelper(serviceinfo.getWsdlUri(),serviceinfo.getAuthConfig());
  }
 else {
    sdh=new ServiceDiscoveryHelper(serviceinfo.getWsdlUri());
  }
  List<Definition> defs=sdh.getDefinitions();
  wsdlTypes=createSchemaFromTypes(defs);
  collectAllXmlSchemaElement();
  collectAllXmlSchemaType();
  Map services=defs.get(0).getServices();
  if (services != null) {
    Iterator svcIter=services.values().iterator();
    populateComponent(serviceinfo,(Service)svcIter.next());
  }
  return serviceinfo;
}

Fixed version (ground truth):
public ServiceInfo buildserviceinformation(ServiceInfo serviceinfo) throws Exception {
  ServiceDiscoveryHelper sdh;
  if (serviceinfo.getAuthConfig() != null && serviceinfo.getWsdlUri().indexOf("String_Node_Str") == 0) {
    sdh=new ServiceDiscoveryHelper(serviceinfo.getWsdlUri(),serviceinfo.getAuthConfig());
  }
 else {
    sdh=new ServiceDiscoveryHelper(serviceinfo.getWsdlUri());
  }
  List<Definition> defs=sdh.getDefinitions();
  wsdlTypes=createSchemaFromTypes(defs);
  collectAllXmlSchemaElement();
  collectAllXmlSchemaType();
  Map services=defs.get(0).getServices();
  if (services != null) {
    Iterator svcIter=services.values().iterator();
    while (svcIter.hasNext()) {
      populateComponent(serviceinfo,(Service)svcIter.next());
    }
  }
  return serviceinfo;
}
Program: 118311
Project: 118311
Buggy source:
private XmlSchema createschemafromtype(org.w3c.dom.Element schemaElement,Definition wsdlDefinition,String documentBase){
  if (schemaElement == null) {
    exceptionMessage=exceptionMessage + "String_Node_Str";
    return null;
  }
  XmlSchema xmlSchema=null;
  XmlSchemaCollection xmlSchemaCollection=new XmlSchemaCollection();
  xmlSchemaCollection.setBaseUri(documentBase);
  xmlSchema=xmlSchemaCollection.read(schemaElement);
  return xmlSchema;
}

Fixed version (ground truth):
private XmlSchema createschemafromtype(org.w3c.dom.Element schemaElement,Definition wsdlDefinition,String documentBase) throws WSDLException {
  if (schemaElement == null) {
    throw new WSDLException(WSDLException.INVALID_WSDL,"String_Node_Str");
  }
  XmlSchema xmlSchema=null;
  XmlSchemaCollection xmlSchemaCollection=new XmlSchemaCollection();
  xmlSchemaCollection.setBaseUri(fixDocumentBase(documentBase));
  xmlSchema=xmlSchemaCollection.read(schemaElement);
  return xmlSchema;
}
Program: 118313
Project: 118313
Buggy source:
/** 
 * DOC gcui Comment method "findIncludesSchema".
 * @param wsdlDefinition
 * @param schemas
 * @param includeElement
 */
private void findIncludesSchema(Definition wsdlDefinition,Vector schemas,List includeElement){
  org.w3c.dom.Element schemaElementt;
  for (int i=0; i < includeElement.size(); i++) {
    schemaElementt=((com.ibm.wsdl.extensions.schema.SchemaReferenceImpl)includeElement.get(i)).getReferencedSchema().getElement();
    String documentBase=((com.ibm.wsdl.extensions.schema.SchemaReferenceImpl)includeElement.get(i)).getReferencedSchema().getDocumentBaseURI();
    XmlSchema schemaInclude=createschemafromtype(schemaElementt,wsdlDefinition,documentBase);
    if (schemaInclude != null) {
      schemas.add(schemaInclude);
      if (schemaInclude.getTargetNamespace() != null) {
        schemaNames.add(schemaInclude.getTargetNamespace());
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * DOC gcui Comment method "findIncludesSchema".
 * @param wsdlDefinition
 * @param schemas
 * @param includeElement
 * @throws WSDLException
 */
private void findIncludesSchema(Definition wsdlDefinition,Vector schemas,List includeElement) throws WSDLException {
  org.w3c.dom.Element schemaElementt;
  for (int i=0; i < includeElement.size(); i++) {
    schemaElementt=((com.ibm.wsdl.extensions.schema.SchemaReferenceImpl)includeElement.get(i)).getReferencedSchema().getElement();
    String documentBase=((com.ibm.wsdl.extensions.schema.SchemaReferenceImpl)includeElement.get(i)).getReferencedSchema().getDocumentBaseURI();
    XmlSchema schemaInclude=createschemafromtype(schemaElementt,wsdlDefinition,documentBase);
    if (schemaInclude != null) {
      schemas.add(schemaInclude);
      if (schemaInclude.getTargetNamespace() != null) {
        schemaNames.add(schemaInclude.getTargetNamespace());
      }
    }
  }
}
Program: 118314
Project: 118314
Buggy source:
public ComponentBuilder(){
  try {
    wsdlFactory=WSDLFactory.newInstance();
  }
 catch (  Exception e) {
    exceptionMessage=exceptionMessage + e.getMessage();
    ExceptionHandler.process(e);
  }
}

Fixed version (ground truth):
public ComponentBuilder() throws WSDLException {
  wsdlFactory=WSDLFactory.newInstance();
}