Program: 146504
Project: 146504
Buggy source:
@Override public View getView(int position,View convertView,ViewGroup parent){
  View v=null;
  TextView timestamp;
  final JSONObject dataToDisplay=getItem(position);
  TextView orderID;
  TextView type;
  TextView amount;
  TextView pair;
  TextView rate;
switch (mListType) {
case Transactions:
    if (convertView == null) {
      v=mInflater.inflate(R.layout.fragment_trans_history_item,parent,false);
    }
 else {
      v=convertView;
    }
  TextView description=(TextView)v.findViewById(R.id.TransHistoryDesc);
timestamp=(TextView)v.findViewById(R.id.TransHistoryTimestamp);
amount=(TextView)v.findViewById(R.id.TransHistoryAmount);
try {
Calendar calendar=Calendar.getInstance(TimeZone.getDefault(),Locale.getDefault());
description.setText(dataToDisplay.getString("String_Node_Str"));
calendar.setTimeInMillis(Long.parseLong(dataToDisplay.getString("String_Node_Str")) * 1000L);
timestamp.setText(mDateFormat.format(calendar.getTime()));
amount.setText(dataToDisplay.getString("String_Node_Str") + dataToDisplay.getString("String_Node_Str"));
}
 catch (JSONException e) {
e.printStackTrace();
}
break;
case TradeOrders:
if (convertView == null) {
v=mInflater.inflate(R.layout.fragment_trade_history_item,parent,false);
}
 else {
v=convertView;
}
pair=(TextView)v.findViewById(R.id.TradeHistoryPair);
rate=(TextView)v.findViewById(R.id.TradeHistoryRate);
amount=(TextView)v.findViewById(R.id.TradeHistoryAmount);
type=(TextView)v.findViewById(R.id.TradeHistoryType);
orderID=(TextView)v.findViewById(R.id.TradeHistoryOrderID);
timestamp=(TextView)v.findViewById(R.id.TradeHistoryTimestamp);
try {
String pairValue=dataToDisplay.getString("String_Node_Str");
Calendar calendar=Calendar.getInstance(TimeZone.getDefault(),Locale.getDefault());
orderID.setText(dataToDisplay.getString("String_Node_Str"));
calendar.setTimeInMillis(Long.parseLong(dataToDisplay.getString("String_Node_Str")) * 1000L);
timestamp.setText(mDateFormat.format(calendar.getTime()));
pair.setText(pairValue.replace("String_Node_Str","String_Node_Str").toUpperCase(Locale.US));
rate.setText(dataToDisplay.getString("String_Node_Str") + "String_Node_Str" + pairValue.substring(4).toUpperCase(Locale.US));
amount.setText(dataToDisplay.getString("String_Node_Str") + "String_Node_Str" + pairValue.substring(0,3).toUpperCase(Locale.US));
type.setText(dataToDisplay.getString("String_Node_Str"));
}
 catch (JSONException e) {
e.printStackTrace();
}
break;
case ActiveOrders:
if (convertView == null) {
v=mInflater.inflate(R.layout.fragment_active_orders_item,parent,false);
}
 else {
v=convertView;
}
pair=(TextView)v.findViewById(R.id.ActiveOrderPair);
type=(TextView)v.findViewById(R.id.ActiveOrderType);
amount=(TextView)v.findViewById(R.id.ActiveOrderAmount);
rate=(TextView)v.findViewById(R.id.ActiveOrderRate);
timestamp=(TextView)v.findViewById(R.id.ActiveOrderTimestamp);
orderID=(TextView)v.findViewById(R.id.ActiveOrderID);
ImageView remove=(ImageView)v.findViewById(R.id.removeOrder);
remove.setOnClickListener(new View.OnClickListener(){
@Override public void onClick(View v){
final int order_id=dataToDisplay.optInt("String_Node_Str");
new AlertDialog.Builder(mContext).setTitle("String_Node_Str").setPositiveButton("String_Node_Str",new DialogInterface.OnClickListener(){
@Override public void onClick(DialogInterface dialog,int which){
new CancelActiveOrder().execute(order_id);
}
}
).setNegativeButton("String_Node_Str",null).setMessage("String_Node_Str" + dataToDisplay.optString("String_Node_Str") + "String_Node_Str").show();
}
}
);
try {
String pairValue=dataToDisplay.getString("String_Node_Str");
Calendar calendar=Calendar.getInstance(TimeZone.getDefault(),Locale.getDefault());
pair.setText(pairValue.replace("String_Node_Str","String_Node_Str").toUpperCase(Locale.US));
type.setText(dataToDisplay.getString("String_Node_Str"));
amount.setText(dataToDisplay.getString("String_Node_Str") + "String_Node_Str" + pairValue.substring(0,3).toUpperCase(Locale.US));
rate.setText(dataToDisplay.getString("String_Node_Str") + "String_Node_Str" + pairValue.substring(4).toUpperCase(Locale.US));
calendar.setTimeInMillis(Long.parseLong(dataToDisplay.getString("String_Node_Str")) * 1000L);
timestamp.setText(mDateFormat.format(calendar.getTime()));
orderID.setText(String.valueOf(mData.get(position).optInt("String_Node_Str")));
}
 catch (JSONException e) {
e.printStackTrace();
}
default :
break;
}
return v;
}

Fixed version (ground truth):
@Override public View getView(int position,View convertView,ViewGroup parent){
  View v=null;
  TextView timestamp;
  final JSONObject dataToDisplay=getItem(position);
  TextView orderID;
  TextView type;
  TextView amount;
  TextView pair;
  TextView rate;
switch (mListType) {
case Transactions:
    if (convertView == null) {
      v=mInflater.inflate(R.layout.fragment_trans_history_item,parent,false);
    }
 else {
      v=convertView;
    }
  TextView description=(TextView)v.findViewById(R.id.TransHistoryDesc);
timestamp=(TextView)v.findViewById(R.id.TransHistoryTimestamp);
amount=(TextView)v.findViewById(R.id.TransHistoryAmount);
try {
Calendar calendar=Calendar.getInstance(TimeZone.getDefault(),Locale.getDefault());
description.setText(dataToDisplay.getString("String_Node_Str"));
calendar.setTimeInMillis(Long.parseLong(dataToDisplay.getString("String_Node_Str")) * 1000L);
timestamp.setText(mDateFormat.format(calendar.getTime()));
amount.setText(dataToDisplay.getString("String_Node_Str") + dataToDisplay.getString("String_Node_Str"));
}
 catch (JSONException e) {
e.printStackTrace();
}
break;
case Trades:
if (convertView == null) {
v=mInflater.inflate(R.layout.fragment_trade_history_item,parent,false);
}
 else {
v=convertView;
}
pair=(TextView)v.findViewById(R.id.TradeHistoryPair);
rate=(TextView)v.findViewById(R.id.TradeHistoryRate);
amount=(TextView)v.findViewById(R.id.TradeHistoryAmount);
type=(TextView)v.findViewById(R.id.TradeHistoryType);
orderID=(TextView)v.findViewById(R.id.TradeHistoryOrderID);
timestamp=(TextView)v.findViewById(R.id.TradeHistoryTimestamp);
try {
String pairValue=dataToDisplay.getString("String_Node_Str");
Calendar calendar=Calendar.getInstance(TimeZone.getDefault(),Locale.getDefault());
orderID.setText(dataToDisplay.getString("String_Node_Str"));
calendar.setTimeInMillis(Long.parseLong(dataToDisplay.getString("String_Node_Str")) * 1000L);
timestamp.setText(mDateFormat.format(calendar.getTime()));
pair.setText(pairValue.replace("String_Node_Str","String_Node_Str").toUpperCase(Locale.US));
rate.setText(dataToDisplay.getString("String_Node_Str") + "String_Node_Str" + pairValue.substring(4).toUpperCase(Locale.US));
amount.setText(dataToDisplay.getString("String_Node_Str") + "String_Node_Str" + pairValue.substring(0,3).toUpperCase(Locale.US));
type.setText(dataToDisplay.getString("String_Node_Str"));
}
 catch (JSONException e) {
e.printStackTrace();
}
break;
case ActiveOrders:
if (convertView == null) {
v=mInflater.inflate(R.layout.fragment_active_orders_item,parent,false);
}
 else {
v=convertView;
}
pair=(TextView)v.findViewById(R.id.ActiveOrderPair);
type=(TextView)v.findViewById(R.id.ActiveOrderType);
amount=(TextView)v.findViewById(R.id.ActiveOrderAmount);
rate=(TextView)v.findViewById(R.id.ActiveOrderRate);
timestamp=(TextView)v.findViewById(R.id.ActiveOrderTimestamp);
orderID=(TextView)v.findViewById(R.id.ActiveOrderID);
ImageView remove=(ImageView)v.findViewById(R.id.removeOrder);
remove.setOnClickListener(new View.OnClickListener(){
@Override public void onClick(View v){
final int order_id=dataToDisplay.optInt("String_Node_Str");
new AlertDialog.Builder(mContext).setTitle("String_Node_Str").setPositiveButton("String_Node_Str",new DialogInterface.OnClickListener(){
@Override public void onClick(DialogInterface dialog,int which){
new CancelActiveOrder().execute(order_id);
}
}
).setNegativeButton("String_Node_Str",null).setMessage("String_Node_Str" + dataToDisplay.optString("String_Node_Str") + "String_Node_Str").show();
}
}
);
try {
String pairValue=dataToDisplay.getString("String_Node_Str");
Calendar calendar=Calendar.getInstance(TimeZone.getDefault(),Locale.getDefault());
pair.setText(pairValue.replace("String_Node_Str","String_Node_Str").toUpperCase(Locale.US));
type.setText(dataToDisplay.getString("String_Node_Str"));
amount.setText(dataToDisplay.getString("String_Node_Str") + "String_Node_Str" + pairValue.substring(0,3).toUpperCase(Locale.US));
rate.setText(dataToDisplay.getString("String_Node_Str") + "String_Node_Str" + pairValue.substring(4).toUpperCase(Locale.US));
calendar.setTimeInMillis(Long.parseLong(dataToDisplay.getString("String_Node_Str")) * 1000L);
timestamp.setText(mDateFormat.format(calendar.getTime()));
orderID.setText(String.valueOf(mData.get(position).optInt("String_Node_Str")));
}
 catch (JSONException e) {
e.printStackTrace();
}
default :
break;
}
return v;
}