Program: 20730
Project: 20730
Buggy source:
public ArtifactMetadata getArtifactFromId(String repoId,String namespace,String projectId,String projectVersion,String id){
  if (!id.startsWith(projectId + "String_Node_Str")) {
    throw new IllegalArgumentException("String_Node_Str" + id + "String_Node_Str"+ projectId+ "String_Node_Str");
  }
  MavenArtifactFacet facet=new MavenArtifactFacet();
  int index=projectId.length() + 1;
  String version;
  String idSubStrFromVersion=id.substring(index);
  if (idSubStrFromVersion.startsWith(projectVersion) && !VersionUtil.isUniqueSnapshot(projectVersion)) {
    version=projectVersion;
  }
 else   if (VersionUtil.isGenericSnapshot(projectVersion)) {
    try {
      int mainVersionLength=projectVersion.length() - 8;
      if (mainVersionLength == 0) {
        throw new IllegalArgumentException("String_Node_Str" + id + "String_Node_Str");
      }
      Matcher m=TIMESTAMP_PATTERN.matcher(idSubStrFromVersion.substring(mainVersionLength));
      m.matches();
      String timestamp=m.group(1);
      String buildNumber=m.group(2);
      facet.setTimestamp(timestamp);
      facet.setBuildNumber(Integer.valueOf(buildNumber));
      version=idSubStrFromVersion.substring(0,mainVersionLength) + timestamp + "String_Node_Str"+ buildNumber;
    }
 catch (    IllegalStateException e) {
      throw new IllegalArgumentException("String_Node_Str" + id + "String_Node_Str"+ projectVersion+ "String_Node_Str");
    }
  }
 else {
    throw new IllegalArgumentException("String_Node_Str" + id + "String_Node_Str"+ projectVersion+ "String_Node_Str");
  }
  String classifier;
  String ext;
  index+=version.length();
  if (index == id.length()) {
    classifier=null;
    ext=null;
  }
 else {
    char c=id.charAt(index);
    if (c == '-') {
      int extIndex=id.lastIndexOf('.');
      if (extIndex > index) {
        classifier=id.substring(index + 1,extIndex);
        ext=id.substring(extIndex + 1);
      }
 else {
        classifier=id.substring(index + 1);
        ext=null;
      }
    }
 else     if (c == '.') {
      classifier=null;
      ext=id.substring(index + 1);
    }
 else {
      throw new IllegalArgumentException("String_Node_Str" + id + "String_Node_Str"+ id.substring(index)+ "String_Node_Str");
    }
  }
  ArtifactMetadata metadata=new ArtifactMetadata();
  metadata.setId(id);
  metadata.setNamespace(namespace);
  metadata.setProject(projectId);
  metadata.setRepositoryId(repoId);
  metadata.setProjectVersion(projectVersion);
  metadata.setVersion(version);
  facet.setClassifier(classifier);
  String type=null;
  for (  ArtifactMappingProvider mapping : artifactMappingProviders) {
    type=mapping.mapClassifierAndExtensionToType(classifier,ext);
    if (type != null) {
      break;
    }
  }
  if (type == null && "String_Node_Str".equals(ext) && isArtifactIdValidMavenPlugin(projectId)) {
    type="String_Node_Str";
  }
  if (type == null) {
    type=ext;
  }
  if (type == null) {
    throw new IllegalArgumentException("String_Node_Str" + id + "String_Node_Str");
  }
  facet.setType(type);
  metadata.addFacet(facet);
  return metadata;
}

Fixed version (ground truth):
public ArtifactMetadata getArtifactFromId(String repoId,String namespace,String projectId,String projectVersion,String id){
  if (!id.startsWith(projectId + "String_Node_Str")) {
    throw new IllegalArgumentException("String_Node_Str" + id + "String_Node_Str"+ projectId+ "String_Node_Str");
  }
  MavenArtifactFacet facet=new MavenArtifactFacet();
  int index=projectId.length() + 1;
  String version;
  String idSubStrFromVersion=id.substring(index);
  if (idSubStrFromVersion.startsWith(projectVersion) && !VersionUtil.isUniqueSnapshot(projectVersion)) {
    version=projectVersion;
  }
 else   if (VersionUtil.isGenericSnapshot(projectVersion)) {
    try {
      int mainVersionLength=projectVersion.length() - 8;
      if (mainVersionLength == 0) {
        throw new IllegalArgumentException("String_Node_Str" + id + "String_Node_Str");
      }
      Matcher m=TIMESTAMP_PATTERN.matcher(idSubStrFromVersion.substring(mainVersionLength));
      m.matches();
      String timestamp=m.group(1);
      String buildNumber=m.group(2);
      facet.setTimestamp(timestamp);
      facet.setBuildNumber(Integer.parseInt(buildNumber));
      version=idSubStrFromVersion.substring(0,mainVersionLength) + timestamp + "String_Node_Str"+ buildNumber;
    }
 catch (    IllegalStateException e) {
      throw new IllegalArgumentException("String_Node_Str" + id + "String_Node_Str"+ projectVersion+ "String_Node_Str");
    }
  }
 else {
    throw new IllegalArgumentException("String_Node_Str" + id + "String_Node_Str"+ projectVersion+ "String_Node_Str");
  }
  String classifier;
  String ext;
  index+=version.length();
  if (index == id.length()) {
    classifier=null;
    ext=null;
  }
 else {
    char c=id.charAt(index);
    if (c == '-') {
      int extIndex=id.lastIndexOf('.');
      if (extIndex > index) {
        classifier=id.substring(index + 1,extIndex);
        ext=id.substring(extIndex + 1);
      }
 else {
        classifier=id.substring(index + 1);
        ext=null;
      }
    }
 else     if (c == '.') {
      classifier=null;
      ext=id.substring(index + 1);
    }
 else {
      throw new IllegalArgumentException("String_Node_Str" + id + "String_Node_Str"+ id.substring(index)+ "String_Node_Str");
    }
  }
  ArtifactMetadata metadata=new ArtifactMetadata();
  metadata.setId(id);
  metadata.setNamespace(namespace);
  metadata.setProject(projectId);
  metadata.setRepositoryId(repoId);
  metadata.setProjectVersion(projectVersion);
  metadata.setVersion(version);
  facet.setClassifier(classifier);
  String type=null;
  for (  ArtifactMappingProvider mapping : artifactMappingProviders) {
    type=mapping.mapClassifierAndExtensionToType(classifier,ext);
    if (type != null) {
      break;
    }
  }
  if (type == null && "String_Node_Str".equals(ext) && isArtifactIdValidMavenPlugin(projectId)) {
    type="String_Node_Str";
  }
  if (type == null) {
    type=ext;
  }
  if (type == null) {
    throw new IllegalArgumentException("String_Node_Str" + id + "String_Node_Str");
  }
  facet.setType(type);
  metadata.addFacet(facet);
  return metadata;
}