nus-yam/ex-repair huggingface dataset:
Program: 126534
Project: 126534
Buggy source:
/** 
 * Only work with one element.
 * @param element
 * @param text
 * @return
 */
public static Object getObjectValue(final IElement element,final String text){
  if (text == null) {
    return null;
  }
  IElementParameter param;
  List<IElementParameter> params=(List<IElementParameter>)element.getElementParametersWithChildrens();
  if (params != null && !params.isEmpty()) {
    for (int i=0; i < params.size(); i++) {
      param=params.get(i);
      if (text.indexOf(param.getVariableName()) != -1 || (param.getVariableName() != null && param.getVariableName().contains(text))) {
        if (param.getFieldType() == EParameterFieldType.TABLE) {
          return createTableValues((List<Map<String,Object>>)param.getValue(),param);
        }
        return param.getValue();
      }
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Only work with one element.
 * @param element
 * @param text
 * @return
 */
public static Object getObjectValue(final IElement element,final String text){
  if (text == null || element == null) {
    return null;
  }
  IElementParameter param;
  List<IElementParameter> params=(List<IElementParameter>)element.getElementParametersWithChildrens();
  if (params != null && !params.isEmpty()) {
    for (int i=0; i < params.size(); i++) {
      param=params.get(i);
      if (text.indexOf(param.getVariableName()) != -1 || (param.getVariableName() != null && param.getVariableName().contains(text))) {
        if (param.getFieldType() == EParameterFieldType.TABLE) {
          return createTableValues((List<Map<String,Object>>)param.getValue(),param);
        }
        return param.getValue();
      }
    }
  }
  return null;
}
Program: 126535
Project: 126535
Buggy source:
public void update();

Fixed version (ground truth):
public boolean update();
Program: 126537
Project: 126537
Buggy source:
/** 
 * Only work with one element.
 * @param element
 * @param text
 * @return
 */
public static Object getObjectValue(final IElement element,final String text){
  if (text == null) {
    return null;
  }
  IElementParameter param;
  List<IElementParameter> params=(List<IElementParameter>)element.getElementParametersWithChildrens();
  if (params != null && !params.isEmpty()) {
    for (int i=0; i < params.size(); i++) {
      param=params.get(i);
      if (text.indexOf(param.getVariableName()) != -1 || (param.getVariableName() != null && param.getVariableName().contains(text))) {
        if (param.getFieldType() == EParameterFieldType.TABLE) {
          return createTableValues((List<Map<String,Object>>)param.getValue(),param);
        }
        return param.getValue();
      }
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Only work with one element.
 * @param element
 * @param text
 * @return
 */
public static Object getObjectValue(final IElement element,final String text){
  if (text == null || element == null) {
    return null;
  }
  IElementParameter param;
  List<IElementParameter> params=(List<IElementParameter>)element.getElementParametersWithChildrens();
  if (params != null && !params.isEmpty()) {
    for (int i=0; i < params.size(); i++) {
      param=params.get(i);
      if (text.indexOf(param.getVariableName()) != -1 || (param.getVariableName() != null && param.getVariableName().contains(text))) {
        if (param.getFieldType() == EParameterFieldType.TABLE) {
          return createTableValues((List<Map<String,Object>>)param.getValue(),param);
        }
        return param.getValue();
      }
    }
  }
  return null;
}
Program: 126539
Project: 126539
Buggy source:
@Override protected void configureShell(Shell newShell){
  super.configureShell(newShell);
  newShell.setText(Messages.getString("String_Node_Str"));
  newShell.setSize(580,450);
  setHelpAvailable(false);
}

Fixed version (ground truth):
@Override protected void configureShell(Shell newShell){
  super.configureShell(newShell);
  newShell.setText(Messages.getString("String_Node_Str"));
  newShell.setSize(700,450);
  setHelpAvailable(false);
}
Program: 126540
Project: 126540
Buggy source:
public INode getRefrenceNode(String componentName);

Fixed version (ground truth):
public INode getRefrenceNode(String componentName,String paletteType);
Program: 126541
Project: 126541
Buggy source:
/** 
 * For hive embedded mode if tables can be fetched from metastore db without any exceptions, then return <code>true</code>. If there is any exceptions thrown, then that indicates it is failed to connection to hive. Added by Marvin Wang on Mar 12, 2013.
 * @return
 * @throws SQLException
 */
public boolean checkConnection() throws SQLException {
  getTables(this.metadataConn.getDatabase(),null,null,new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"});
  return true;
}

Fixed version (ground truth):
/** 
 * For hive embedded mode if tables can be fetched from metastore db without any exceptions, then return <code>true</code>. If there is any exceptions thrown, then that indicates it is failed to connection to hive. Added by Marvin Wang on Mar 12, 2013.
 * @return
 * @throws SQLException
 */
public boolean checkConnection() throws SQLException {
  boolean isWindows=EnvironmentUtils.isWindowsSystem();
  String hive_version=(String)this.metadataConn.getParameter("String_Node_Str");
  List<HiveConnVersionInfo> hiveEmbeddedNotSupportOnWindows=new ArrayList<HiveConnVersionInfo>();
  hiveEmbeddedNotSupportOnWindows.add(HiveConnVersionInfo.HDP_2_0);
  hiveEmbeddedNotSupportOnWindows.add(HiveConnVersionInfo.HDP_2_1);
  hiveEmbeddedNotSupportOnWindows.add(HiveConnVersionInfo.Cloudera_CDH5);
  hiveEmbeddedNotSupportOnWindows.add(HiveConnVersionInfo.PIVOTAL_HD_2_0);
  boolean isSupportEmbedded=hiveEmbeddedNotSupportOnWindows.contains(HiveConnVersionInfo.valueOf(hive_version));
  if (isWindows && isSupportEmbedded) {
    throw new SQLException("String_Node_Str");
  }
  getTables(this.metadataConn.getDatabase(),null,null,new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"});
  return true;
}
Program: 126542
Project: 126542
Buggy source:
public static boolean canEncrypt(final IElement node,final String parameterName){
  String value=getValue(node,parameterName);
  if (value.startsWith("String_Node_Str") && value.endsWith("String_Node_Str") && TalendQuoteUtils.filterQuote(value).length() == 0) {
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
public static boolean canEncrypt(final IElement node,final String parameterName){
  String value=getValue(node,parameterName);
  if (value != null && value.startsWith("String_Node_Str") && value.endsWith("String_Node_Str") && TalendQuoteUtils.filterQuote(value).length() == 0) {
    return true;
  }
 else {
    return false;
  }
}
Program: 126543
Project: 126543
Buggy source:
public static boolean canEncrypt(final IElement node,final String parameterName){
  String value=getValue(node,parameterName);
  if (value.startsWith("String_Node_Str") && value.endsWith("String_Node_Str") && TalendQuoteUtils.filterQuote(value).length() == 0) {
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
public static boolean canEncrypt(final IElement node,final String parameterName){
  String value=getValue(node,parameterName);
  if (value != null && value.startsWith("String_Node_Str") && value.endsWith("String_Node_Str") && TalendQuoteUtils.filterQuote(value).length() == 0) {
    return true;
  }
 else {
    return false;
  }
}
Program: 126545
Project: 126545
Buggy source:
/** 
 * For hive embedded mode if tables can be fetched from metastore db without any exceptions, then return <code>true</code>. If there is any exceptions thrown, then that indicates it is failed to connection to hive. Added by Marvin Wang on Mar 12, 2013.
 * @return
 * @throws SQLException
 */
public boolean checkConnection() throws SQLException {
  boolean isWindows=EnvironmentUtils.isWindowsSystem();
  String hive_version=(String)this.metadataConn.getParameter("String_Node_Str");
  boolean isSupportEmbedded=ArrayUtils.contains(HiveConnVersionInfo.getHiveVersionsNotSupportOnWindows(),HiveConnVersionInfo.valueOf(hive_version));
  if (isWindows && isSupportEmbedded) {
    throw new SQLException("String_Node_Str");
  }
  getTables(this.metadataConn.getDatabase(),null,null,new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"});
  return true;
}

Fixed version (ground truth):
/** 
 * For hive embedded mode if tables can be fetched from metastore db without any exceptions, then return <code>true</code>. If there is any exceptions thrown, then that indicates it is failed to connection to hive. Added by Marvin Wang on Mar 12, 2013.
 * @return
 * @throws SQLException
 */
public boolean checkConnection() throws SQLException {
  if (!isSupportJRE) {
    throw new SQLException("String_Node_Str");
  }
  boolean isWindows=EnvironmentUtils.isWindowsSystem();
  String hive_version=(String)this.metadataConn.getParameter("String_Node_Str");
  boolean isSupportEmbedded=ArrayUtils.contains(HiveConnVersionInfo.getHiveVersionsNotSupportOnWindows(),HiveConnVersionInfo.valueOf(hive_version));
  if (isWindows && isSupportEmbedded) {
    throw new SQLException("String_Node_Str");
  }
  getTables(this.metadataConn.getDatabase(),null,null,new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"});
  return true;
}
Program: 126546
Project: 126546
Buggy source:
public EmbeddedHiveDataBaseMetadata(IMetadataConnection metadataConn){
  super();
  this.metadataConn=metadataConn;
  this.classLoader=HiveClassLoaderFactory.getInstance().getClassLoader(metadataConn);
  init();
}

Fixed version (ground truth):
public EmbeddedHiveDataBaseMetadata(IMetadataConnection metadataConn){
  super();
  this.metadataConn=metadataConn;
  this.classLoader=HiveClassLoaderFactory.getInstance().getClassLoader(metadataConn);
  this.isSupportJRE=true;
  init();
}
Program: 126548
Project: 126548
Buggy source:
@Override protected void configureShell(Shell newShell){
  super.configureShell(newShell);
  newShell.setText(Messages.getString("String_Node_Str"));
  newShell.setSize(580,450);
  setHelpAvailable(false);
}

Fixed version (ground truth):
@Override protected void configureShell(Shell newShell){
  super.configureShell(newShell);
  newShell.setText(Messages.getString("String_Node_Str"));
  newShell.setSize(700,450);
  setHelpAvailable(false);
}
Program: 126549
Project: 126549
Buggy source:
public INode getRefrenceNode(String componentName);

Fixed version (ground truth):
public INode getRefrenceNode(String componentName,String paletteType);
Program: 126550
Project: 126550
Buggy source:
public static boolean canEncrypt(final IElement node,final String parameterName){
  String value=getValue(node,parameterName);
  if (value.startsWith("String_Node_Str") && value.endsWith("String_Node_Str") && TalendQuoteUtils.filterQuote(value).length() == 0) {
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
public static boolean canEncrypt(final IElement node,final String parameterName){
  String value=getValue(node,parameterName);
  if (value != null && value.startsWith("String_Node_Str") && value.endsWith("String_Node_Str") && TalendQuoteUtils.filterQuote(value).length() == 0) {
    return true;
  }
 else {
    return false;
  }
}
Program: 126551
Project: 126551
Buggy source:
@Override public ResultSet getTables(String catalog,String database,String tableNamePattern,String[] types) throws SQLException {
  if (databaseName != null) {
    database=databaseName;
  }
  String sql=null;
  if (types != null && types.length > 0) {
    String kind="String_Node_Str";
    if (types[0].equalsIgnoreCase(CONST_VIEW)) {
      kind="String_Node_Str";
    }
 else     if (types[0].equalsIgnoreCase(CONST_SYNONYM)) {
      kind="String_Node_Str";
    }
    sql="String_Node_Str" + database + "String_Node_Str"+ kind+ "String_Node_Str"+ tableNamePattern+ "String_Node_Str";
  }
 else {
    sql="String_Node_Str" + database + "String_Node_Str"+ tableNamePattern+ "String_Node_Str";
  }
  ResultSet rs=null;
  Statement stmt=null;
  List<String[]> list=new ArrayList<String[]>();
  try {
    stmt=connection.createStatement();
    rs=stmt.executeQuery(sql);
    while (rs.next()) {
      String name=rs.getString("String_Node_Str").trim();
      if (database == null || "String_Node_Str".equals(database)) {
        database=rs.getString("String_Node_Str").trim();
      }
      String type=rs.getString("String_Node_Str").trim();
      String[] r=new String[]{"String_Node_Str",database,name,type,"String_Node_Str"};
      list.add(r);
    }
  }
 catch (  SQLException e) {
    throw new RuntimeException(e);
  }
 finally {
    try {
      rs.close();
      stmt.close();
    }
 catch (    Exception e) {
    }
  }
  TeradataResultSet tableResultSet=new TeradataResultSet();
  tableResultSet.setMetadata(TABLE_META);
  tableResultSet.setData(list);
  return tableResultSet;
}

Fixed version (ground truth):
@Override public ResultSet getTables(String catalog,String database,String tableNamePattern,String[] types) throws SQLException {
  if (databaseName != null) {
    database=databaseName;
  }
  String sql=null;
  if (types != null && types.length > 0) {
    sql="String_Node_Str" + database + "String_Node_Str"+ addTypesToSql(types)+ "String_Node_Str"+ tableNamePattern+ "String_Node_Str";
  }
 else {
    sql="String_Node_Str" + database + "String_Node_Str"+ tableNamePattern+ "String_Node_Str";
  }
  ResultSet rs=null;
  Statement stmt=null;
  List<String[]> list=new ArrayList<String[]>();
  try {
    stmt=connection.createStatement();
    rs=stmt.executeQuery(sql);
    while (rs.next()) {
      String name=rs.getString("String_Node_Str").trim();
      if (database == null || "String_Node_Str".equals(database)) {
        database=rs.getString("String_Node_Str").trim();
      }
      String type=rs.getString("String_Node_Str").trim();
      String[] r=new String[]{"String_Node_Str",database,name,type,"String_Node_Str"};
      list.add(r);
    }
  }
 catch (  SQLException e) {
    throw new RuntimeException(e);
  }
 finally {
    try {
      rs.close();
      stmt.close();
    }
 catch (    Exception e) {
    }
  }
  TeradataResultSet tableResultSet=new TeradataResultSet();
  tableResultSet.setMetadata(TABLE_META);
  tableResultSet.setData(list);
  return tableResultSet;
}
Program: 126552
Project: 126552
Buggy source:
/** 
 * For hive embedded mode if tables can be fetched from metastore db without any exceptions, then return <code>true</code>. If there is any exceptions thrown, then that indicates it is failed to connection to hive. Added by Marvin Wang on Mar 12, 2013.
 * @return
 * @throws SQLException
 */
public boolean checkConnection() throws SQLException {
  boolean isWindows=EnvironmentUtils.isWindowsSystem();
  String hive_version=(String)this.metadataConn.getParameter("String_Node_Str");
  List<HiveConnVersionInfo> hiveEmbeddedNotSupportOnWindows=new ArrayList<HiveConnVersionInfo>();
  hiveEmbeddedNotSupportOnWindows.add(HiveConnVersionInfo.HDP_2_0);
  hiveEmbeddedNotSupportOnWindows.add(HiveConnVersionInfo.HDP_2_1);
  hiveEmbeddedNotSupportOnWindows.add(HiveConnVersionInfo.Cloudera_CDH5);
  hiveEmbeddedNotSupportOnWindows.add(HiveConnVersionInfo.PIVOTAL_HD_2_0);
  boolean isSupportEmbedded=hiveEmbeddedNotSupportOnWindows.contains(HiveConnVersionInfo.valueOf(hive_version));
  if (isWindows && isSupportEmbedded) {
    throw new SQLException("String_Node_Str");
  }
  getTables(this.metadataConn.getDatabase(),null,null,new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"});
  return true;
}

Fixed version (ground truth):
/** 
 * For hive embedded mode if tables can be fetched from metastore db without any exceptions, then return <code>true</code>. If there is any exceptions thrown, then that indicates it is failed to connection to hive. Added by Marvin Wang on Mar 12, 2013.
 * @return
 * @throws SQLException
 */
public boolean checkConnection() throws SQLException {
  boolean isWindows=EnvironmentUtils.isWindowsSystem();
  String hive_version=(String)this.metadataConn.getParameter("String_Node_Str");
  boolean isSupportEmbedded=ArrayUtils.contains(HiveConnVersionInfo.getHiveVersionsNotSupportOnWindows(),HiveConnVersionInfo.valueOf(hive_version));
  if (isWindows && isSupportEmbedded) {
    throw new SQLException("String_Node_Str");
  }
  getTables(this.metadataConn.getDatabase(),null,null,new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"});
  return true;
}
Program: 126555
Project: 126555
Buggy source:
/** 
 * DOC ycbai Comment method "hasDiffsFromClusterToProcess". <p> Check whether there is any change of hadoop related parameters from Process to Hadoop cluster. </p>
 * @param hcConnection
 * @param process
 * @return true if there are some changes from them, otherwise return false.
 */
public boolean hasDiffsFromClusterToProcess(Connection hcConnection,IProcess process);

Fixed version (ground truth):
/** 
 * DOC ycbai Comment method "hasDiffsFromClusterToProcess". <p> Check whether there is any change of hadoop related parameters from Process to Hadoop cluster. </p>
 * @param hcConnection
 * @param process
 * @return true if there are some changes from them, otherwise return false.
 */
public boolean hasDiffsFromClusterToProcess(Item item,IProcess process);
Program: 126556
Project: 126556
Buggy source:
/** 
 * ggu Comment method "updateQuery". if show is false, will work for context menu action.
 */
public static boolean updateDBConnection(ConnectionItem connectionItem,boolean show,final boolean onlySimpleShow){
  List<IRepositoryViewObject> updateList=new ArrayList<IRepositoryViewObject>();
  IProxyRepositoryFactory factory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
  List<Relation> relations=RelationshipItemBuilder.getInstance().getItemsRelatedTo(connectionItem.getProperty().getId(),RelationshipItemBuilder.LATEST_VERSION,RelationshipItemBuilder.PROPERTY_RELATION);
  RepositoryUpdateManager repositoryUpdateManager=new RepositoryUpdateManager(connectionItem.getConnection(),relations){
    @Override public Set<EUpdateItemType> getTypes(){
      Set<EUpdateItemType> types=new HashSet<EUpdateItemType>();
      types.add(EUpdateItemType.NODE_PROPERTY);
      types.add(EUpdateItemType.JOB_PROPERTY_EXTRA);
      types.add(EUpdateItemType.JOB_PROPERTY_STATS_LOGS);
      types.add(EUpdateItemType.JOB_PROPERTY_HEADERFOOTER);
      return types;
    }
  }
;
  return repositoryUpdateManager.doWork(true,false);
}

Fixed version (ground truth):
/** 
 * ggu Comment method "updateQuery". if show is false, will work for context menu action.
 */
public static boolean updateDBConnection(ConnectionItem connectionItem,boolean show,final boolean onlySimpleShow){
  List<IRepositoryViewObject> updateList=new ArrayList<IRepositoryViewObject>();
  IProxyRepositoryFactory factory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
  List<Relation> relations=RelationshipItemBuilder.getInstance().getItemsRelatedTo(connectionItem.getProperty().getId(),RelationshipItemBuilder.LATEST_VERSION,RelationshipItemBuilder.PROPERTY_RELATION);
  RepositoryUpdateManager repositoryUpdateManager=new RepositoryUpdateManager(connectionItem.getConnection(),relations){
    @Override public Set<EUpdateItemType> getTypes(){
      Set<EUpdateItemType> types=new HashSet<EUpdateItemType>();
      types.add(EUpdateItemType.NODE_PROPERTY);
      types.add(EUpdateItemType.JOB_PROPERTY_EXTRA);
      types.add(EUpdateItemType.JOB_PROPERTY_STATS_LOGS);
      types.add(EUpdateItemType.JOB_PROPERTY_HEADERFOOTER);
      types.add(EUpdateItemType.JOB_PROPERTY_MAPREDUCE);
      return types;
    }
  }
;
  return repositoryUpdateManager.doWork(true,false);
}
Program: 126558
Project: 126558
Buggy source:
/** 
 * DOC ycbai Comment method "hasDiffsFromClusterToProcess". <p> Check whether there is any change of hadoop related parameters from Process to Hadoop cluster. </p>
 * @param hcConnection
 * @param process
 * @return true if there are some changes from them, otherwise return false.
 */
public boolean hasDiffsFromClusterToProcess(Connection hcConnection,IProcess process);

Fixed version (ground truth):
/** 
 * DOC ycbai Comment method "hasDiffsFromClusterToProcess". <p> Check whether there is any change of hadoop related parameters from Process to Hadoop cluster. </p>
 * @param hcConnection
 * @param process
 * @return true if there are some changes from them, otherwise return false.
 */
public boolean hasDiffsFromClusterToProcess(Item item,IProcess process);
Program: 126559
Project: 126559
Buggy source:
/** 
 * ggu Comment method "updateQuery". if show is false, will work for context menu action.
 */
public static boolean updateDBConnection(ConnectionItem connectionItem,boolean show,final boolean onlySimpleShow){
  List<IRepositoryViewObject> updateList=new ArrayList<IRepositoryViewObject>();
  IProxyRepositoryFactory factory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
  List<Relation> relations=RelationshipItemBuilder.getInstance().getItemsRelatedTo(connectionItem.getProperty().getId(),RelationshipItemBuilder.LATEST_VERSION,RelationshipItemBuilder.PROPERTY_RELATION);
  RepositoryUpdateManager repositoryUpdateManager=new RepositoryUpdateManager(connectionItem.getConnection(),relations){
    @Override public Set<EUpdateItemType> getTypes(){
      Set<EUpdateItemType> types=new HashSet<EUpdateItemType>();
      types.add(EUpdateItemType.NODE_PROPERTY);
      types.add(EUpdateItemType.JOB_PROPERTY_EXTRA);
      types.add(EUpdateItemType.JOB_PROPERTY_STATS_LOGS);
      types.add(EUpdateItemType.JOB_PROPERTY_HEADERFOOTER);
      return types;
    }
  }
;
  return repositoryUpdateManager.doWork(true,false);
}

Fixed version (ground truth):
/** 
 * ggu Comment method "updateQuery". if show is false, will work for context menu action.
 */
public static boolean updateDBConnection(ConnectionItem connectionItem,boolean show,final boolean onlySimpleShow){
  List<IRepositoryViewObject> updateList=new ArrayList<IRepositoryViewObject>();
  IProxyRepositoryFactory factory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
  List<Relation> relations=RelationshipItemBuilder.getInstance().getItemsRelatedTo(connectionItem.getProperty().getId(),RelationshipItemBuilder.LATEST_VERSION,RelationshipItemBuilder.PROPERTY_RELATION);
  RepositoryUpdateManager repositoryUpdateManager=new RepositoryUpdateManager(connectionItem.getConnection(),relations){
    @Override public Set<EUpdateItemType> getTypes(){
      Set<EUpdateItemType> types=new HashSet<EUpdateItemType>();
      types.add(EUpdateItemType.NODE_PROPERTY);
      types.add(EUpdateItemType.JOB_PROPERTY_EXTRA);
      types.add(EUpdateItemType.JOB_PROPERTY_STATS_LOGS);
      types.add(EUpdateItemType.JOB_PROPERTY_HEADERFOOTER);
      types.add(EUpdateItemType.JOB_PROPERTY_MAPREDUCE);
      return types;
    }
  }
;
  return repositoryUpdateManager.doWork(true,false);
}
Program: 126561
Project: 126561
Buggy source:
@Override public ResultSet getTables(String catalog,String database,String tableNamePattern,String[] types) throws SQLException {
  if (databaseName != null) {
    database=databaseName;
  }
  String sql=null;
  if (types != null && types.length > 0) {
    String kind="String_Node_Str";
    if (types[0].equalsIgnoreCase(CONST_VIEW)) {
      kind="String_Node_Str";
    }
 else     if (types[0].equalsIgnoreCase(CONST_SYNONYM)) {
      kind="String_Node_Str";
    }
    sql="String_Node_Str" + database + "String_Node_Str"+ kind+ "String_Node_Str";
  }
 else {
    sql="String_Node_Str" + database + "String_Node_Str";
  }
  ResultSet rs=null;
  Statement stmt=null;
  List<String[]> list=new ArrayList<String[]>();
  try {
    stmt=connection.createStatement();
    rs=stmt.executeQuery(sql);
    while (rs.next()) {
      String name=rs.getString("String_Node_Str").trim();
      if (database == null || "String_Node_Str".equals(database)) {
        database=rs.getString("String_Node_Str").trim();
      }
      String type=rs.getString("String_Node_Str").trim();
      String[] r=new String[]{"String_Node_Str",database,name,type,"String_Node_Str"};
      list.add(r);
    }
  }
 catch (  SQLException e) {
    throw new RuntimeException(e);
  }
 finally {
    try {
      rs.close();
      stmt.close();
    }
 catch (    Exception e) {
    }
  }
  TeradataResultSet tableResultSet=new TeradataResultSet();
  tableResultSet.setMetadata(TABLE_META);
  tableResultSet.setData(list);
  return tableResultSet;
}

Fixed version (ground truth):
@Override public ResultSet getTables(String catalog,String database,String tableNamePattern,String[] types) throws SQLException {
  if (databaseName != null) {
    database=databaseName;
  }
  String sql=null;
  if (types != null && types.length > 0) {
    String kind="String_Node_Str";
    if (types[0].equalsIgnoreCase(CONST_VIEW)) {
      kind="String_Node_Str";
    }
 else     if (types[0].equalsIgnoreCase(CONST_SYNONYM)) {
      kind="String_Node_Str";
    }
    sql="String_Node_Str" + database + "String_Node_Str"+ kind+ "String_Node_Str"+ tableNamePattern+ "String_Node_Str";
  }
 else {
    sql="String_Node_Str" + database + "String_Node_Str"+ tableNamePattern+ "String_Node_Str";
  }
  ResultSet rs=null;
  Statement stmt=null;
  List<String[]> list=new ArrayList<String[]>();
  try {
    stmt=connection.createStatement();
    rs=stmt.executeQuery(sql);
    while (rs.next()) {
      String name=rs.getString("String_Node_Str").trim();
      if (database == null || "String_Node_Str".equals(database)) {
        database=rs.getString("String_Node_Str").trim();
      }
      String type=rs.getString("String_Node_Str").trim();
      String[] r=new String[]{"String_Node_Str",database,name,type,"String_Node_Str"};
      list.add(r);
    }
  }
 catch (  SQLException e) {
    throw new RuntimeException(e);
  }
 finally {
    try {
      rs.close();
      stmt.close();
    }
 catch (    Exception e) {
    }
  }
  TeradataResultSet tableResultSet=new TeradataResultSet();
  tableResultSet.setMetadata(TABLE_META);
  tableResultSet.setData(list);
  return tableResultSet;
}
Program: 126564
Project: 126564
Buggy source:
@Override public void postStartup(){
  super.postStartup();
  if (!ArrayUtils.contains(Platform.getApplicationArgs(),EclipseCommandLine.TALEND_DISABLE_LOGINDIALOG_COMMAND)) {
    RegisterManagement.getInstance().validateRegistration();
  }
  PerspectiveReviewUtil.setPerspectiveTabs();
  ProxyRepositoryFactory.getInstance().executeRepositoryWorkUnit(new RepositoryWorkUnit<Object>("String_Node_Str"){
    @Override protected void run() throws LoginException, PersistenceException {
    }
  }
);
}

Fixed version (ground truth):
@Override public void postStartup(){
  super.postStartup();
  if (!ArrayUtils.contains(Platform.getApplicationArgs(),EclipseCommandLine.TALEND_DISABLE_LOGINDIALOG_COMMAND)) {
    RegisterManagement.getInstance().validateRegistration();
  }
  PerspectiveReviewUtil.setPerspectiveTabs();
  CommonsPlugin.setWorkbenchCreated(true);
  ProxyRepositoryFactory.getInstance().executeRepositoryWorkUnit(new RepositoryWorkUnit<Object>("String_Node_Str"){
    @Override protected void run() throws LoginException, PersistenceException {
    }
  }
);
}
Program: 126567
Project: 126567
Buggy source:
@Override public void postStartup(){
  super.postStartup();
  if (!ArrayUtils.contains(Platform.getApplicationArgs(),EclipseCommandLine.TALEND_DISABLE_LOGINDIALOG_COMMAND)) {
    RegisterManagement.getInstance().validateRegistration();
  }
  PerspectiveReviewUtil.setPerspectiveTabs();
  Job myJob=new Job("String_Node_Str"){
    @Override protected IStatus run(    IProgressMonitor monitor){
      RepositoryWorkUnit rwu=new RepositoryWorkUnit<Object>("String_Node_Str"){
        @Override protected void run() throws LoginException, PersistenceException {
        }
      }
;
      rwu.setAvoidUnloadResources(true);
      rwu.setUnloadResourcesAfterRun(true);
      rwu.setFilesModifiedOutsideOfRWU(true);
      ProxyRepositoryFactory.getInstance().executeRepositoryWorkUnit(rwu);
      return org.eclipse.core.runtime.Status.OK_STATUS;
    }
  }
;
  myJob.schedule();
}

Fixed version (ground truth):
@Override public void postStartup(){
  super.postStartup();
  if (!ArrayUtils.contains(Platform.getApplicationArgs(),EclipseCommandLine.TALEND_DISABLE_LOGINDIALOG_COMMAND)) {
    RegisterManagement.getInstance().validateRegistration();
  }
  PerspectiveReviewUtil.setPerspectiveTabs();
  CommonsPlugin.setWorkbenchCreated(true);
  Job myJob=new Job("String_Node_Str"){
    @Override protected IStatus run(    IProgressMonitor monitor){
      RepositoryWorkUnit rwu=new RepositoryWorkUnit<Object>("String_Node_Str"){
        @Override protected void run() throws LoginException, PersistenceException {
        }
      }
;
      rwu.setAvoidUnloadResources(true);
      rwu.setUnloadResourcesAfterRun(true);
      rwu.setFilesModifiedOutsideOfRWU(true);
      ProxyRepositoryFactory.getInstance().executeRepositoryWorkUnit(rwu);
      return org.eclipse.core.runtime.Status.OK_STATUS;
    }
  }
;
  myJob.schedule();
}
Program: 126568
Project: 126568
Buggy source:
@Override public void postStartup(){
  super.postStartup();
  if (!ArrayUtils.contains(Platform.getApplicationArgs(),EclipseCommandLine.TALEND_DISABLE_LOGINDIALOG_COMMAND)) {
    RegisterManagement.getInstance().validateRegistration();
  }
  PerspectiveReviewUtil.setPerspectiveTabs();
  Job myJob=new Job("String_Node_Str"){
    @Override protected IStatus run(    IProgressMonitor monitor){
      RepositoryWorkUnit rwu=new RepositoryWorkUnit<Object>("String_Node_Str"){
        @Override protected void run() throws LoginException, PersistenceException {
        }
      }
;
      rwu.setAvoidUnloadResources(true);
      rwu.setUnloadResourcesAfterRun(true);
      rwu.setFilesModifiedOutsideOfRWU(true);
      ProxyRepositoryFactory.getInstance().executeRepositoryWorkUnit(rwu);
      return org.eclipse.core.runtime.Status.OK_STATUS;
    }
  }
;
  myJob.schedule();
}

Fixed version (ground truth):
@Override public void postStartup(){
  super.postStartup();
  if (!ArrayUtils.contains(Platform.getApplicationArgs(),EclipseCommandLine.TALEND_DISABLE_LOGINDIALOG_COMMAND)) {
    RegisterManagement.getInstance().validateRegistration();
  }
  PerspectiveReviewUtil.setPerspectiveTabs();
  CommonsPlugin.setWorkbenchCreated(true);
  Job myJob=new Job("String_Node_Str"){
    @Override protected IStatus run(    IProgressMonitor monitor){
      RepositoryWorkUnit rwu=new RepositoryWorkUnit<Object>("String_Node_Str"){
        @Override protected void run() throws LoginException, PersistenceException {
        }
      }
;
      rwu.setAvoidUnloadResources(true);
      rwu.setUnloadResourcesAfterRun(true);
      rwu.setFilesModifiedOutsideOfRWU(true);
      ProxyRepositoryFactory.getInstance().executeRepositoryWorkUnit(rwu);
      return org.eclipse.core.runtime.Status.OK_STATUS;
    }
  }
;
  myJob.schedule();
}
Program: 126569
Project: 126569
Buggy source:
@Override public void checkInstalledLibraries(){
  Set<String> existLibraries=repositoryBundleService.list(false);
  Set<String> existDllLibraries=repositoryBundleService.listAllDllFiles();
  existLibraries.addAll(existDllLibraries);
  List<ModuleNeeded> toCheck=ModulesNeededProvider.getModulesNeeded();
  for (  ModuleNeeded current : toCheck) {
    if (existLibraries.contains(current.getModuleName())) {
      current.setStatus(ELibraryInstallStatus.INSTALLED);
    }
 else {
      current.setStatus(ELibraryInstallStatus.NOT_INSTALLED);
    }
  }
  List<String> modulesNeededNames=ModulesNeededProvider.getModulesNeededNames();
  ModulesNeededProvider.getUnUsedModules().clear();
  for (  String library : existLibraries) {
    if (!modulesNeededNames.contains(library)) {
      ModulesNeededProvider.userAddUnusedModules("String_Node_Str",library);
    }
  }
}

Fixed version (ground truth):
@Override public void checkInstalledLibraries(){
  List<ModuleNeeded> toCheck=ModulesNeededProvider.getModulesNeeded();
  Set<String> existLibraries=repositoryBundleService.list(false);
  Set<String> existDllLibraries=repositoryBundleService.listAllDllFiles();
  existLibraries.addAll(existDllLibraries);
  for (  ModuleNeeded current : toCheck) {
    if (existLibraries.contains(current.getModuleName())) {
      current.setStatus(ELibraryInstallStatus.INSTALLED);
    }
 else {
      current.setStatus(ELibraryInstallStatus.NOT_INSTALLED);
    }
  }
  List<String> modulesNeededNames=ModulesNeededProvider.getModulesNeededNames();
  ModulesNeededProvider.getUnUsedModules().clear();
  for (  String library : existLibraries) {
    if (!modulesNeededNames.contains(library)) {
      ModulesNeededProvider.userAddUnusedModules("String_Node_Str",library);
    }
  }
}
Program: 126570
Project: 126570
Buggy source:
@Override public void checkInstalledLibraries(){
  Set<String> existLibraries=repositoryBundleService.list(false);
  Set<String> existDllLibraries=repositoryBundleService.listAllDllFiles();
  existLibraries.addAll(existDllLibraries);
  List<ModuleNeeded> toCheck=ModulesNeededProvider.getModulesNeeded();
  for (  ModuleNeeded current : toCheck) {
    if (existLibraries.contains(current.getModuleName())) {
      current.setStatus(ELibraryInstallStatus.INSTALLED);
    }
 else {
      current.setStatus(ELibraryInstallStatus.NOT_INSTALLED);
    }
  }
  List<String> modulesNeededNames=ModulesNeededProvider.getModulesNeededNames();
  ModulesNeededProvider.getUnUsedModules().clear();
  for (  String library : existLibraries) {
    if (!modulesNeededNames.contains(library)) {
      ModulesNeededProvider.userAddUnusedModules("String_Node_Str",library);
    }
  }
}

Fixed version (ground truth):
@Override public void checkInstalledLibraries(){
  List<ModuleNeeded> toCheck=ModulesNeededProvider.getModulesNeeded();
  Set<String> existLibraries=repositoryBundleService.list(false);
  Set<String> existDllLibraries=repositoryBundleService.listAllDllFiles();
  existLibraries.addAll(existDllLibraries);
  for (  ModuleNeeded current : toCheck) {
    if (existLibraries.contains(current.getModuleName())) {
      current.setStatus(ELibraryInstallStatus.INSTALLED);
    }
 else {
      current.setStatus(ELibraryInstallStatus.NOT_INSTALLED);
    }
  }
  List<String> modulesNeededNames=ModulesNeededProvider.getModulesNeededNames();
  ModulesNeededProvider.getUnUsedModules().clear();
  for (  String library : existLibraries) {
    if (!modulesNeededNames.contains(library)) {
      ModulesNeededProvider.userAddUnusedModules("String_Node_Str",library);
    }
  }
}
Program: 126571
Project: 126571
Buggy source:
private boolean isRepository(INode node){
  IElementParameter schemaParam=node.getElementParameter("String_Node_Str");
  if (schemaParam != null) {
    String schemaType=(String)schemaParam.getValue();
    if (schemaType.equals("String_Node_Str")) {
      return true;
    }
  }
  schemaParam=node.getElementParameter("String_Node_Str");
  if (schemaParam != null) {
    List schemaType=(List)schemaParam.getValue();
    for (int i=0; i < schemaType.size(); i++) {
      HashMap map=(HashMap)schemaType.get(i);
      Set set=map.keySet();
      Iterator it=set.iterator();
      while (it.hasNext()) {
        String key=(String)it.next();
        if (key.equals("String_Node_Str")) {
          String value=(String)map.get(key);
          if (this.outputMetaTable.getLabel().equals(TalendQuoteUtils.removeQuotes(value))) {
            if (map.containsKey("String_Node_Str") && map.containsValue("String_Node_Str")) {
              return true;
            }
          }
        }
      }
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean isRepository(INode node,IMetadataTable currentTable){
  boolean nodeModeFlag=false;
  for (  IElementParameter param : node.getElementParameters()) {
    if (param.getFieldType() == EParameterFieldType.SCHEMA_TYPE && (param.getContext() == null || param.getContext().equals(currentTable.getAttachedConnector()))) {
      IElementParameter schemaParam=param.getChildParameters().get("String_Node_Str");
      if (schemaParam.getValue() != null) {
        if (schemaParam.getValue().equals("String_Node_Str")) {
          nodeModeFlag=true;
          break;
        }
      }
    }
  }
  if (!nodeModeFlag) {
    IElementParameter schemaParam=node.getElementParameter("String_Node_Str");
    if (schemaParam != null) {
      List schemaType=(List)schemaParam.getValue();
      for (int i=0; i < schemaType.size(); i++) {
        HashMap map=(HashMap)schemaType.get(i);
        Set set=map.keySet();
        Iterator it=set.iterator();
        while (it.hasNext()) {
          String key=(String)it.next();
          if (key.equals("String_Node_Str")) {
            String value=(String)map.get(key);
            if (this.outputMetaTable.getLabel().equals(TalendQuoteUtils.removeQuotes(value))) {
              if (map.containsKey("String_Node_Str") && map.containsValue("String_Node_Str")) {
                nodeModeFlag=true;
              }
            }
          }
        }
      }
    }
  }
  return nodeModeFlag;
}
Program: 126573
Project: 126573
Buggy source:
private boolean isRepository(INode node){
  IElementParameter schemaParam=node.getElementParameter("String_Node_Str");
  if (schemaParam != null) {
    String schemaType=(String)schemaParam.getValue();
    if (schemaType.equals("String_Node_Str")) {
      return true;
    }
  }
  schemaParam=node.getElementParameter("String_Node_Str");
  if (schemaParam != null) {
    List schemaType=(List)schemaParam.getValue();
    for (int i=0; i < schemaType.size(); i++) {
      HashMap map=(HashMap)schemaType.get(i);
      Set set=map.keySet();
      Iterator it=set.iterator();
      while (it.hasNext()) {
        String key=(String)it.next();
        if (key.equals("String_Node_Str")) {
          String value=(String)map.get(key);
          if (this.outputMetaTable.getLabel().equals(TalendQuoteUtils.removeQuotes(value))) {
            if (map.containsKey("String_Node_Str") && map.containsValue("String_Node_Str")) {
              return true;
            }
          }
        }
      }
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean isRepository(INode node,IMetadataTable currentTable){
  boolean nodeModeFlag=false;
  for (  IElementParameter param : node.getElementParameters()) {
    if (param.getFieldType() == EParameterFieldType.SCHEMA_TYPE && (param.getContext() == null || param.getContext().equals(currentTable.getAttachedConnector()))) {
      IElementParameter schemaParam=param.getChildParameters().get("String_Node_Str");
      if (schemaParam.getValue() != null) {
        if (schemaParam.getValue().equals("String_Node_Str")) {
          nodeModeFlag=true;
          break;
        }
      }
    }
  }
  if (!nodeModeFlag) {
    IElementParameter schemaParam=node.getElementParameter("String_Node_Str");
    if (schemaParam != null) {
      List schemaType=(List)schemaParam.getValue();
      for (int i=0; i < schemaType.size(); i++) {
        HashMap map=(HashMap)schemaType.get(i);
        Set set=map.keySet();
        Iterator it=set.iterator();
        while (it.hasNext()) {
          String key=(String)it.next();
          if (key.equals("String_Node_Str")) {
            String value=(String)map.get(key);
            if (this.outputMetaTable.getLabel().equals(TalendQuoteUtils.removeQuotes(value))) {
              if (map.containsKey("String_Node_Str") && map.containsValue("String_Node_Str")) {
                nodeModeFlag=true;
              }
            }
          }
        }
      }
    }
  }
  return nodeModeFlag;
}
Program: 126578
Project: 126578
Buggy source:
protected Project computeProject(ResourcesManager manager,ImportItem itemRecord,IPath path){
  InputStream stream=null;
  Map<IPath,Project> pathWithProjects=ImportCacheHelper.getInstance().getPathWithProjects();
  try {
    if (!pathWithProjects.containsKey(path)) {
      stream=manager.getStream(path);
      Resource resource=createResource(itemRecord,path,false);
      resource.load(stream,null);
      pathWithProjects.put(path,(Project)EcoreUtil.getObjectByType(resource.getContents(),PropertiesPackage.eINSTANCE.getProject()));
    }
    return pathWithProjects.get(path);
  }
 catch (  IOException e) {
  }
 finally {
    if (stream != null) {
      try {
        stream.close();
      }
 catch (      IOException e) {
      }
    }
  }
  return null;
}

Fixed version (ground truth):
protected Project computeProject(ResourcesManager manager,ImportItem itemRecord,IPath path){
  InputStream stream=null;
  Map<IPath,Project> pathWithProjects=ImportCacheHelper.getInstance().getPathWithProjects();
  try {
    if (!pathWithProjects.containsKey(path)) {
      stream=manager.getStream(path);
      Resource resource=createResource(itemRecord,path,false);
      resource.load(stream,null);
      pathWithProjects.put(path,(Project)EcoreUtil.getObjectByType(resource.getContents(),PropertiesPackage.eINSTANCE.getProject()));
    }
    return pathWithProjects.get(path);
  }
 catch (  IOException e) {
    if (Platform.inDebugMode()) {
      ExceptionHandler.process(e);
    }
  }
 finally {
    if (stream != null) {
      try {
        stream.close();
      }
 catch (      IOException e) {
      }
    }
  }
  return null;
}
Program: 126579
Project: 126579
Buggy source:
/** 
 * mzhao load resource with item record.
 * @param manager
 * @param itemRecord
 * @param resource
 * @return
 */
protected Resource loadResource(ResourcesManager manager,ImportItem itemRecord){
  InputStream stream=null;
  try {
    final Resource resource=createResource(itemRecord,itemRecord.getPath(),false);
    stream=manager.getStream(itemRecord.getPath());
    URIConverter uriConverter=resource.getResourceSet().getURIConverter();
    resource.getResourceSet().setURIConverter(new ExtensibleURIConverterImpl(){
      @Override public InputStream createInputStream(      URI uri,      Map<?,?> options) throws IOException {
        InputStream inputStream=null;
        EPackage ePackage=resource.getResourceSet().getPackageRegistry().getEPackage(uri.toString());
        if (ePackage != null || !"String_Node_Str".equals(uri.scheme())) {
          inputStream=super.createInputStream(uri,options);
        }
 else {
          inputStream=null;
        }
        return inputStream;
      }
    }
);
    resource.load(stream,null);
    resource.getResourceSet().setURIConverter(uriConverter);
    return resource;
  }
 catch (  Exception e) {
  }
 finally {
    if (stream != null) {
      try {
        stream.close();
      }
 catch (      IOException e) {
      }
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * mzhao load resource with item record.
 * @param manager
 * @param itemRecord
 * @param resource
 * @return
 */
protected Resource loadResource(ResourcesManager manager,ImportItem itemRecord){
  InputStream stream=null;
  try {
    final Resource resource=createResource(itemRecord,itemRecord.getPath(),false);
    stream=manager.getStream(itemRecord.getPath());
    final ResourceSet resourceSet=resource.getResourceSet();
    URIConverter uriConverter=resourceSet.getURIConverter();
    resourceSet.setURIConverter(new ExtensibleURIConverterImpl(){
      @Override public InputStream createInputStream(      URI uri,      Map<?,?> options) throws IOException {
        InputStream inputStream=null;
        EPackage ePackage=resourceSet.getPackageRegistry().getEPackage(uri.toString());
        if (ePackage != null || !"String_Node_Str".equals(uri.scheme())) {
          inputStream=super.createInputStream(uri,options);
        }
 else {
          inputStream=null;
        }
        return inputStream;
      }
    }
);
    resource.load(stream,null);
    resourceSet.setURIConverter(uriConverter);
    return resource;
  }
 catch (  Exception e) {
    if (Platform.inDebugMode()) {
      ExceptionHandler.process(e);
    }
  }
 finally {
    if (stream != null) {
      try {
        stream.close();
      }
 catch (      IOException e) {
        if (Platform.inDebugMode()) {
          ExceptionHandler.process(e);
        }
      }
    }
  }
  return null;
}
Program: 126580
Project: 126580
Buggy source:
@Override public InputStream createInputStream(URI uri,Map<?,?> options) throws IOException {
  InputStream inputStream=null;
  EPackage ePackage=resource.getResourceSet().getPackageRegistry().getEPackage(uri.toString());
  if (ePackage != null || !"String_Node_Str".equals(uri.scheme())) {
    inputStream=super.createInputStream(uri,options);
  }
 else {
    inputStream=null;
  }
  return inputStream;
}

Fixed version (ground truth):
@Override public InputStream createInputStream(URI uri,Map<?,?> options) throws IOException {
  InputStream inputStream=null;
  EPackage ePackage=resourceSet.getPackageRegistry().getEPackage(uri.toString());
  if (ePackage != null || !"String_Node_Str".equals(uri.scheme())) {
    inputStream=super.createInputStream(uri,options);
  }
 else {
    inputStream=null;
  }
  return inputStream;
}
Program: 126581
Project: 126581
Buggy source:
/** 
 * load the resource
 */
public static Resource loadResource(ResourcesManager manager,ImportItem importItem){
  InputStream stream=null;
  try {
    final Resource resource=createResource(importItem,importItem.getPath(),false);
    stream=manager.getStream(importItem.getPath());
    URIConverter uriConverter=resource.getResourceSet().getURIConverter();
    resource.getResourceSet().setURIConverter(new ExtensibleURIConverterImpl(){
      @Override public InputStream createInputStream(      URI uri,      Map<?,?> options) throws IOException {
        InputStream inputStream=null;
        EPackage ePackage=resource.getResourceSet().getPackageRegistry().getEPackage(uri.toString());
        if (ePackage != null || !"String_Node_Str".equals(uri.scheme())) {
          inputStream=super.createInputStream(uri,options);
        }
 else {
          inputStream=null;
        }
        return inputStream;
      }
    }
);
    resource.load(stream,null);
    resource.getResourceSet().setURIConverter(uriConverter);
    return resource;
  }
 catch (  Exception e) {
  }
 finally {
    if (stream != null) {
      try {
        stream.close();
      }
 catch (      IOException e) {
      }
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * load the resource
 */
public static Resource loadResource(ResourcesManager manager,ImportItem importItem){
  InputStream stream=null;
  try {
    final Resource resource=createResource(importItem,importItem.getPath(),false);
    stream=manager.getStream(importItem.getPath());
    final ResourceSet resourceSet=resource.getResourceSet();
    URIConverter uriConverter=resourceSet.getURIConverter();
    resourceSet.setURIConverter(new ExtensibleURIConverterImpl(){
      @Override public InputStream createInputStream(      URI uri,      Map<?,?> options) throws IOException {
        InputStream inputStream=null;
        EPackage ePackage=resourceSet.getPackageRegistry().getEPackage(uri.toString());
        if (ePackage != null || !"String_Node_Str".equals(uri.scheme())) {
          inputStream=super.createInputStream(uri,options);
        }
 else {
          inputStream=null;
        }
        return inputStream;
      }
    }
);
    resource.load(stream,null);
    resourceSet.setURIConverter(uriConverter);
    return resource;
  }
 catch (  Exception e) {
    if (Platform.inDebugMode()) {
      ExceptionHandler.process(e);
    }
  }
 finally {
    if (stream != null) {
      try {
        stream.close();
      }
 catch (      IOException e) {
        if (Platform.inDebugMode()) {
          ExceptionHandler.process(e);
        }
      }
    }
  }
  return null;
}
Program: 126582
Project: 126582
Buggy source:
@Override public InputStream createInputStream(URI uri,Map<?,?> options) throws IOException {
  InputStream inputStream=null;
  EPackage ePackage=resource.getResourceSet().getPackageRegistry().getEPackage(uri.toString());
  if (ePackage != null || !"String_Node_Str".equals(uri.scheme())) {
    inputStream=super.createInputStream(uri,options);
  }
 else {
    inputStream=null;
  }
  return inputStream;
}

Fixed version (ground truth):
@Override public InputStream createInputStream(URI uri,Map<?,?> options) throws IOException {
  InputStream inputStream=null;
  EPackage ePackage=resourceSet.getPackageRegistry().getEPackage(uri.toString());
  if (ePackage != null || !"String_Node_Str".equals(uri.scheme())) {
    inputStream=super.createInputStream(uri,options);
  }
 else {
    inputStream=null;
  }
  return inputStream;
}