Program: 19059
Project: 19059
Buggy source:
@Test @Ignore public void mergeCompleteAssetTest() throws Exception {
  boolean clean=false;
  try {
    RemoteRegistry wso2=RSProviderUtil.getRegistry();
    clean=!wso2.resourceExists(resources[0]);
  }
 catch (  RegistryException e) {
  }
  assumeTrue(clean);
  CreateCompleteAssetResponse response=createAsset();
  assertEquals(AckValue.SUCCESS,response.getAck());
  assertEquals(null,response.getErrorMessage());
  UpdateAssetArtifactsResponse responseUpdate=mergeAsset(response.getAssetKey().getAssetId());
  assertEquals(AckValue.SUCCESS,responseUpdate.getAck());
  assertEquals(null,responseUpdate.getErrorMessage());
  AssetInfo assetInfo=this.getAsset(response.getAssetKey().getAssetId());
  List<ArtifactInfo> artifacts=assetInfo.getArtifactInfo();
  assertTrue(artifacts != null);
  assertEquals(2,artifacts.size());
  for (  ArtifactInfo artifactInfo : artifacts) {
    if (("String_Node_Str" + assetName).equals(artifactInfo.getArtifact().getArtifactName())) {
      assertEquals(new String((baseUrl + assetName).getBytes("String_Node_Str")),new String(artifactInfo.getArtifactDetail()));
    }
 else     if (("String_Node_Str" + assetName + "String_Node_Str").equals(artifactInfo.getArtifact().getArtifactName())) {
      assertEquals(new String((baseUrl + assetName + "String_Node_Str").getBytes("String_Node_Str")),new String(artifactInfo.getArtifactDetail()));
    }
 else {
      fail("String_Node_Str");
    }
    assertEquals("String_Node_Str",artifactInfo.getArtifact().getArtifactCategory());
    assertEquals(ArtifactValueType.URL,artifactInfo.getArtifact().getArtifactValueType());
    assertEquals("String_Node_Str",artifactInfo.getContentType());
  }
}

Fixed version (ground truth):
@Test public void mergeCompleteAssetTest() throws Exception {
  boolean clean=false;
  try {
    RemoteRegistry wso2=RSProviderUtil.getRegistry();
    clean=!wso2.resourceExists(resources[0]);
  }
 catch (  RegistryException e) {
  }
  assertTrue(clean);
  CreateCompleteAssetResponse response=createAsset();
  String errorMessage=null;
  if (!response.getAck().equals(AckValue.SUCCESS)) {
    for (    CommonErrorData error : response.getErrorMessage().getError()) {
      errorMessage=error.getMessage();
      fail("String_Node_Str" + errorMessage);
    }
  }
  UpdateAssetArtifactsResponse responseUpdate=mergeAsset(response.getAssetKey().getAssetId());
  assertEquals(AckValue.SUCCESS,responseUpdate.getAck());
  assertEquals(null,responseUpdate.getErrorMessage());
  AssetInfo assetInfo=this.getAsset(response.getAssetKey().getAssetId());
  List<ArtifactInfo> artifacts=assetInfo.getArtifactInfo();
  assertTrue(artifacts != null);
  assertEquals(2,artifacts.size());
  for (  ArtifactInfo artifactInfo : artifacts) {
    if (("String_Node_Str" + assetName).equals(artifactInfo.getArtifact().getArtifactName())) {
      assertEquals(new String((baseUrl + assetName).getBytes("String_Node_Str")),new String(artifactInfo.getArtifactDetail()));
    }
 else     if (("String_Node_Str" + assetName + "String_Node_Str").equals(artifactInfo.getArtifact().getArtifactName())) {
      assertEquals(new String((baseUrl + assetName + "String_Node_Str").getBytes("String_Node_Str")),new String(artifactInfo.getArtifactDetail()));
    }
 else {
      fail("String_Node_Str");
    }
    assertEquals("String_Node_Str",artifactInfo.getArtifact().getArtifactCategory());
    assertEquals(ArtifactValueType.URL,artifactInfo.getArtifact().getArtifactValueType());
    assertEquals("String_Node_Str",artifactInfo.getContentType());
  }
}