Program: 69713
Project: 69713
Buggy source:
@Test public void testImportCourse() throws IOException, URISyntaxException {
  URL cpUrl=CoursesTest.class.getResource("String_Node_Str");
  assertNotNull(cpUrl);
  File cp=new File(cpUrl.toURI());
  assertTrue(conn.login("String_Node_Str","String_Node_Str"));
  URI request=UriBuilder.fromUri(getContextURI()).path("String_Node_Str").build();
  HttpPost method=conn.createPost(request,MediaType.APPLICATION_JSON,true);
  String softKey=UUID.randomUUID().toString().replace("String_Node_Str","String_Node_Str").substring(0,30);
  HttpEntity entity=MultipartEntityBuilder.create().setMode(HttpMultipartMode.BROWSER_COMPATIBLE).addBinaryBody("String_Node_Str",cp,ContentType.APPLICATION_OCTET_STREAM,cp.getName()).addTextBody("String_Node_Str","String_Node_Str").addTextBody("String_Node_Str","String_Node_Str").addTextBody("String_Node_Str","String_Node_Str").addTextBody("String_Node_Str","String_Node_Str").addTextBody("String_Node_Str","String_Node_Str").addTextBody("String_Node_Str",softKey).build();
  method.setEntity(entity);
  HttpResponse response=conn.execute(method);
  assertTrue(response.getStatusLine().getStatusCode() == 200 || response.getStatusLine().getStatusCode() == 201);
  CourseVO vo=conn.parse(response,CourseVO.class);
  assertNotNull(vo);
  assertNotNull(vo.getRepoEntryKey());
  assertNotNull(vo.getKey());
  Long repoKey=vo.getRepoEntryKey();
  RepositoryEntry re=RepositoryManager.getInstance().lookupRepositoryEntry(repoKey);
  assertNotNull(re);
  assertNotNull(re.getOwnerGroup());
  assertNotNull(re.getOlatResource());
  assertEquals("String_Node_Str",re.getDisplayname());
  assertEquals(softKey,re.getSoftkey());
}

Fixed version (ground truth):
@Test public void testImportCourse() throws IOException, URISyntaxException {
  URL cpUrl=CoursesTest.class.getResource("String_Node_Str");
  assertNotNull(cpUrl);
  File cp=new File(cpUrl.toURI());
  assertTrue(conn.login("String_Node_Str","String_Node_Str"));
  URI request=UriBuilder.fromUri(getContextURI()).path("String_Node_Str").build();
  HttpPost method=conn.createPost(request,MediaType.APPLICATION_JSON);
  String softKey=UUID.randomUUID().toString().replace("String_Node_Str","String_Node_Str").substring(0,30);
  HttpEntity entity=MultipartEntityBuilder.create().setMode(HttpMultipartMode.BROWSER_COMPATIBLE).addBinaryBody("String_Node_Str",cp,ContentType.APPLICATION_OCTET_STREAM,cp.getName()).addTextBody("String_Node_Str","String_Node_Str").addTextBody("String_Node_Str","String_Node_Str").addTextBody("String_Node_Str","String_Node_Str").addTextBody("String_Node_Str","String_Node_Str").addTextBody("String_Node_Str","String_Node_Str").addTextBody("String_Node_Str",softKey).build();
  method.setEntity(entity);
  HttpResponse response=conn.execute(method);
  assertTrue(response.getStatusLine().getStatusCode() == 200 || response.getStatusLine().getStatusCode() == 201);
  CourseVO vo=conn.parse(response,CourseVO.class);
  assertNotNull(vo);
  assertNotNull(vo.getRepoEntryKey());
  assertNotNull(vo.getKey());
  Long repoKey=vo.getRepoEntryKey();
  RepositoryEntry re=RepositoryManager.getInstance().lookupRepositoryEntry(repoKey);
  assertNotNull(re);
  assertNotNull(re.getOwnerGroup());
  assertNotNull(re.getOlatResource());
  assertEquals("String_Node_Str",re.getDisplayname());
  assertEquals(softKey,re.getSoftkey());
}