Program: 118872
Project: 118872
Buggy source:
@Override public String storeComponentProperties(ComponentProperties properties,String name,String repositoryLocation,Schema schema){
  String serializedProperties=properties.toSerialized();
  if (repositoryLocation.contains(IGenericConstants.REPOSITORY_LOCATION_SEPARATOR)) {
    GenericConnectionItem item=getGenericConnectionItem(repositoryLocation.substring(0,repositoryLocation.indexOf(IGenericConstants.REPOSITORY_LOCATION_SEPARATOR)));
    if (item == null) {
      throw new RuntimeException("String_Node_Str" + repositoryLocation);
    }
    GenericConnection connection=(GenericConnection)item.getConnection();
    SubContainer subContainer=createContainer(name,serializedProperties);
    if (repositoryLocation.endsWith(IGenericConstants.REPOSITORY_LOCATION_SEPARATOR)) {
      if (item != null) {
        connection.getOwnedElement().add(subContainer);
      }
    }
 else {
      SubContainer parentContainer=getContainer(connection,repositoryLocation);
      parentContainer.getOwnedElement().add(subContainer);
    }
    if (schema != null) {
      MetadataTable metadataTable=createSchema(subContainer,name,serializedProperties);
      SchemaUtils.convertComponentSchemaIntoTalendSchema(schema,metadataTable);
    }
    return repositoryLocation + IGenericConstants.REPOSITORY_LOCATION_SEPARATOR + name;
  }
 else {
    GenericConnectionItem item=getGenericConnectionItem(repositoryLocation);
    if (item != null) {
      GenericConnection connection=(GenericConnection)item.getConnection();
      connection.setCompProperties(serializedProperties);
      return repositoryLocation + IGenericConstants.REPOSITORY_LOCATION_SEPARATOR;
    }
 else {
      throw new RuntimeException("String_Node_Str" + repositoryLocation);
    }
  }
}

Fixed version (ground truth):
@Override public String storeComponentProperties(ComponentProperties properties,String name,String repositoryLocation,Schema schema){
  String serializedProperties=properties.toSerialized();
  if (repositoryLocation.contains(IGenericConstants.REPOSITORY_LOCATION_SEPARATOR)) {
    GenericConnectionItem item=getGenericConnectionItem(repositoryLocation.substring(0,repositoryLocation.indexOf(IGenericConstants.REPOSITORY_LOCATION_SEPARATOR)));
    if (item == null) {
      throw new RuntimeException("String_Node_Str" + repositoryLocation);
    }
    GenericConnection connection=(GenericConnection)item.getConnection();
    SubContainer subContainer=createContainer(name,serializedProperties);
    if (repositoryLocation.endsWith(IGenericConstants.REPOSITORY_LOCATION_SEPARATOR)) {
      if (item != null) {
        connection.getOwnedElement().add(subContainer);
      }
    }
 else {
      SubContainer parentContainer=getContainer(connection,repositoryLocation);
      parentContainer.getOwnedElement().add(subContainer);
    }
    if (schema != null) {
      MetadataTable metadataTable=createSchema(subContainer,name,serializedProperties);
      SchemaUtils.convertComponentSchemaIntoTalendSchema(schema,metadataTable);
    }
    return repositoryLocation + IGenericConstants.REPOSITORY_LOCATION_SEPARATOR + name;
  }
 else {
    GenericConnectionItem item=getGenericConnectionItem(repositoryLocation);
    if (item != null) {
      GenericConnection connection=(GenericConnection)item.getConnection();
      connection.setCompProperties(serializedProperties);
      connection.getOwnedElement().clear();
      return repositoryLocation + IGenericConstants.REPOSITORY_LOCATION_SEPARATOR;
    }
 else {
      throw new RuntimeException("String_Node_Str" + repositoryLocation);
    }
  }
}