Program: 184299
Project: 184299
Buggy source:
public boolean callMethod(Methods method,AsyncRestRequestListener<Methods,JSONObject> callback,String... params){
  boolean result=false;
switch (method) {
case login:
    if (params.length != 2)     break;
  if (params[0] == null || params[1] == null)   break;
ApiCall loginCall=new ApiCall(context,callback,method,"String_Node_Str","String_Node_Str");
RestClient loginClient=new RestClient(secureUrl,httpClient,RequestMethod.POST);
loginClient.AddParam("String_Node_Str","String_Node_Str");
loginClient.AddParam("String_Node_Str",params[0]);
loginClient.AddParam("String_Node_Str",Auth.md5(params[1]));
loginClient.AddParam("String_Node_Str",Installation.id(context.getApplicationContext()));
loginClient.AddParam("String_Node_Str",Auth.Hmac.getSecretKey().toString());
loginCall.execute(loginClient);
result=true;
break;
case checkCredentials:
ApiCall checkCredentialsCall=new ApiCall(context,callback,method);
RestClient checkCredentialsClient=new RestClient(secureUrl,httpClient,RequestMethod.POST);
String installID=Installation.id(context.getApplicationContext());
String timestamp=Long.toString(Auth.getTimestamp());
String data="String_Node_Str" + timestamp + installID;
checkCredentialsClient.AddParam("String_Node_Str","String_Node_Str");
checkCredentialsClient.AddParam("String_Node_Str",installID);
checkCredentialsClient.AddParam("String_Node_Str",timestamp);
try {
checkCredentialsClient.AddParam("String_Node_Str",Auth.Hmac.generate(data).toString());
}
 catch (InvalidKeyException e) {
e.printStackTrace();
return false;
}
catch (NoSuchAlgorithmException e) {
e.printStackTrace();
return false;
}
checkCredentialsCall.execute(checkCredentialsClient);
result=true;
break;
case logout:
break;
case resetPassword:
break;
case getContract:
break;
case phone:
break;
case serviceReport:
break;
}
return result;
}

Fixed version (ground truth):
public boolean callMethod(Methods method,AsyncRestRequestListener<Methods,JSONObject> callback,String... params){
  boolean result=false;
switch (method) {
case login:
    if (params.length != 2)     break;
  if (params[0] == null || params[1] == null)   break;
ApiCall loginCall=new ApiCall(context,callback,method,"String_Node_Str","String_Node_Str");
RestClient loginClient=new RestClient(secureUrl,httpClient,RequestMethod.POST);
loginClient.AddParam("String_Node_Str","String_Node_Str");
loginClient.AddParam("String_Node_Str",params[0]);
loginClient.AddParam("String_Node_Str",Auth.md5(params[1]).toString());
loginClient.AddParam("String_Node_Str",URLEncoder.encode(Installation.id(context.getApplicationContext())));
loginClient.AddParam("String_Node_Str",Auth.Hmac.getSecretKey().toString());
loginCall.execute(loginClient);
result=true;
break;
case checkCredentials:
ApiCall checkCredentialsCall=new ApiCall(context,callback,method);
RestClient checkCredentialsClient=new RestClient(secureUrl,httpClient,RequestMethod.POST);
String installID=Installation.id(context.getApplicationContext());
String timestamp=Long.toString(Auth.getTimestamp());
String data="String_Node_Str" + timestamp + installID;
checkCredentialsClient.AddParam("String_Node_Str","String_Node_Str");
checkCredentialsClient.AddParam("String_Node_Str",installID);
checkCredentialsClient.AddParam("String_Node_Str",timestamp);
try {
checkCredentialsClient.AddParam("String_Node_Str",Auth.Hmac.generate(data).toString());
}
 catch (InvalidKeyException e) {
e.printStackTrace();
return false;
}
catch (NoSuchAlgorithmException e) {
e.printStackTrace();
return false;
}
checkCredentialsCall.execute(checkCredentialsClient);
result=true;
break;
case logout:
break;
case resetPassword:
break;
case getContract:
break;
case phone:
break;
case serviceReport:
break;
}
return result;
}