Program: 46677
Project: 46677
Buggy source:
@Test public void testOAuthRequestHelper() throws GeneralSecurityException, MalformedURLException {
  String url="String_Node_Str";
  String method="String_Node_Str";
  String consumerKey="String_Node_Str";
  String consumerSecret="String_Node_Str";
  String tokenSecret="String_Node_Str";
  String secrets=OAuthEncoder.encode(consumerSecret) + "String_Node_Str" + OAuthEncoder.encode(tokenSecret);
  OAuthRequestHelper.ParamList paramList=new OAuthRequestHelper.ParamList(new String[][]{{"String_Node_Str",consumerKey},{"String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str"}});
  OAuthRequestHelper helper=new OAuthRequestHelper(url,method,secrets,paramList,null,null);
  String authHeaderStr=helper.getAuthorizationHeaderString("String_Node_Str");
  final String PREF="String_Node_Str";
  authHeaderStr.startsWith(PREF);
  String s=authHeaderStr.substring(PREF.length(),authHeaderStr.length());
  String[] ss=s.split("String_Node_Str");
  for (int i=0; i < ss.length; ++i)   ss[i]=ss[i].trim();
  Arrays.sort(ss);
  assertArrayEquals(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"},ss);
  String urlNotIncludingAuthQuery=helper.getUrlStringIncludeQueryParams();
  assertEquals(url,urlNotIncludingAuthQuery);
{
    String urlIncludingAuthQuery=helper.getUrlStringIncludeQueryParams(true);
    assertTrue("String_Node_Str",urlIncludingAuthQuery.startsWith(url + "String_Node_Str"));
    String queryParamsStr=urlIncludingAuthQuery.substring((url + "String_Node_Str").length());
    String[] params=queryParamsStr.split("String_Node_Str");
    Arrays.sort(params);
    assertArrayEquals(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"},params);
  }
{
    String reqBodyIncludingAuthQuery=helper.getRequestBodyString(true);
    String[] params=reqBodyIncludingAuthQuery.split("String_Node_Str");
    Arrays.sort(params);
    assertArrayEquals(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"},params);
  }
}

Fixed version (ground truth):
@Test public void testOAuthRequestHelper() throws GeneralSecurityException, MalformedURLException {
  String url="String_Node_Str";
  String method="String_Node_Str";
  String consumerKey="String_Node_Str";
  String consumerSecret="String_Node_Str";
  String tokenSecret="String_Node_Str";
  String secrets=OAuthEncoder.encode(consumerSecret) + "String_Node_Str" + OAuthEncoder.encode(tokenSecret);
  OAuthRequestHelper.ParamList paramList=new OAuthRequestHelper.ParamList(new String[][]{{"String_Node_Str",consumerKey},{"String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str"},{"String_Node_Str","String_Node_Str"}});
  OAuthRequestHelper helper=new OAuthRequestHelper(url,method,secrets,paramList,null,null);
  String authHeaderStr=helper.getAuthorizationHeaderString("String_Node_Str");
  final String PREF="String_Node_Str";
  assertTrue("String_Node_Str",authHeaderStr.startsWith(PREF));
  String s=authHeaderStr.substring(PREF.length(),authHeaderStr.length());
  String[] ss=s.split("String_Node_Str");
  for (int i=0; i < ss.length; ++i)   ss[i]=ss[i].trim();
  Arrays.sort(ss);
  assertArrayEquals(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"},ss);
  String urlNotIncludingAuthQuery=helper.getUrlStringIncludeQueryParams();
  assertEquals(url,urlNotIncludingAuthQuery);
{
    String urlIncludingAuthQuery=helper.getUrlStringIncludeQueryParams(true);
    assertTrue("String_Node_Str",urlIncludingAuthQuery.startsWith(url + "String_Node_Str"));
    String queryParamsStr=urlIncludingAuthQuery.substring((url + "String_Node_Str").length());
    String[] params=queryParamsStr.split("String_Node_Str");
    Arrays.sort(params);
    assertArrayEquals(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"},params);
  }
{
    String reqBodyIncludingAuthQuery=helper.getRequestBodyString(true);
    String[] params=reqBodyIncludingAuthQuery.split("String_Node_Str");
    Arrays.sort(params);
    assertArrayEquals(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"},params);
  }
}