Program: 111190
Project: 111190
Buggy source:
/** 
 * Constructor that is called when inflating a view from XML. This is called when a view is being constructed from an XML file, supplying attributes that were specified in the XML file. This version uses a default style of 0, so the only attribute values applied are those in the Context's Theme and the given AttributeSet. <p/> <p/> The method onFinishInflate() will be called after all children have been added.
 * @param context The Context the view is running in, through which it canaccess the current theme, resources, etc.
 * @param attrs   The attributes of the XML tag that is inflating the view.
 * @see #View(android.content.Context,android.util.AttributeSet,int)
 */
public ValueLineChart(Context context,AttributeSet attrs){
  super(context,attrs);
  TypedArray a=context.getTheme().obtainStyledAttributes(attrs,R.styleable.ValueLineChart,0,0);
  try {
    mUseCubic=a.getBoolean(R.styleable.ValueLineChart_egUseCubic,DEF_USE_CUBIC);
    mUseOverlapFill=a.getBoolean(R.styleable.ValueLineChart_egUseOverlapFill,DEF_USE_OVERLAP_FILL);
    mLineStroke=a.getDimension(R.styleable.ValueLineChart_egLineStroke,Utils.dpToPx(DEF_LINE_STROKE));
    mFirstMultiplier=a.getFloat(R.styleable.ValueLineChart_egCurveSmoothness,DEF_FIRST_MULTIPLIER);
    mSecondMultiplier=1.0f - mFirstMultiplier;
    mShowIndicator=a.getBoolean(R.styleable.ValueLineChart_egShowValueIndicator,DEF_SHOW_INDICATOR);
    mIndicatorWidth=a.getDimension(R.styleable.ValueLineChart_egIndicatorWidth,Utils.dpToPx(DEF_INDICATOR_WIDTH));
    mIndicatorLineColor=a.getColor(R.styleable.ValueLineChart_egIndicatorLineColor,DEF_INDICATOR_COLOR);
    mIndicatorTextColor=a.getColor(R.styleable.ValueLineChart_egIndicatorTextColor,DEF_INDICATOR_COLOR);
    mIndicatorTextSize=a.getDimension(R.styleable.ValueLineChart_egIndicatorWidth,Utils.dpToPx(DEF_INDICATOR_TEXT_SIZE));
    mIndicatorLeftPadding=a.getDimension(R.styleable.ValueLineChart_egIndicatorLeftPadding,Utils.dpToPx(DEF_INDICATOR_LEFT_PADDING));
    mIndicatorTopPadding=a.getDimension(R.styleable.ValueLineChart_egIndicatorTopPadding,Utils.dpToPx(DEF_INDICATOR_TOP_PADDING));
    mShowStandardValue=a.getBoolean(R.styleable.ValueLineChart_egShowStandardValue,DEF_SHOW_STANDARD_VALUE);
    mStandardValueIndicatorStroke=a.getDimension(R.styleable.ValueLineChart_egStandardValueIndicatorStroke,Utils.dpToPx(DEF_STANDARD_VALUE_INDICATOR_STROKE));
    mStandardValueColor=a.getColor(R.styleable.ValueLineChart_egStandardValueColor,DEF_STANDARD_VALUE_COLOR);
    mXAxisStroke=a.getDimension(R.styleable.ValueLineChart_egXAxisStroke,Utils.dpToPx(DEF_X_AXIS_STROKE));
    mActivateIndicatorShadow=a.getBoolean(R.styleable.ValueLineChart_egActivateIndicatorShadow,DEF_ACTIVATE_INDICATOR_SHADOW);
    mIndicatorShadowStrength=a.getDimension(R.styleable.ValueLineChart_egActivateIndicatorShadow,Utils.dpToPx(DEF_INDICATOR_SHADOW_STRENGTH));
    mIndicatorShadowColor=a.getColor(R.styleable.ValueLineChart_egIndicatorShadowColor,DEF_INDICATOR_SHADOW_COLOR);
    mIndicatorTextUnit=a.getString(R.styleable.ValueLineChart_egIndicatorTextUnit);
  }
  finally {
    a.recycle();
  }
  if (mIndicatorTextUnit == null) {
    mIndicatorTextUnit="String_Node_Str";
  }
  initializeGraph();
}

Fixed version (ground truth):
/** 
 * Constructor that is called when inflating a view from XML. This is called when a view is being constructed from an XML file, supplying attributes that were specified in the XML file. This version uses a default style of 0, so the only attribute values applied are those in the Context's Theme and the given AttributeSet. <p/> <p/> The method onFinishInflate() will be called after all children have been added.
 * @param context The Context the view is running in, through which it canaccess the current theme, resources, etc.
 * @param attrs   The attributes of the XML tag that is inflating the view.
 * @see #View(android.content.Context,android.util.AttributeSet,int)
 */
public ValueLineChart(Context context,AttributeSet attrs){
  super(context,attrs);
  TypedArray a=context.getTheme().obtainStyledAttributes(attrs,R.styleable.ValueLineChart,0,0);
  try {
    mUseCubic=a.getBoolean(R.styleable.ValueLineChart_egUseCubic,DEF_USE_CUBIC);
    mUseOverlapFill=a.getBoolean(R.styleable.ValueLineChart_egUseOverlapFill,DEF_USE_OVERLAP_FILL);
    mLineStroke=a.getDimension(R.styleable.ValueLineChart_egLineStroke,Utils.dpToPx(DEF_LINE_STROKE));
    mFirstMultiplier=a.getFloat(R.styleable.ValueLineChart_egCurveSmoothness,DEF_FIRST_MULTIPLIER);
    mSecondMultiplier=1.0f - mFirstMultiplier;
    mShowIndicator=a.getBoolean(R.styleable.ValueLineChart_egShowValueIndicator,DEF_SHOW_INDICATOR);
    mIndicatorWidth=a.getDimension(R.styleable.ValueLineChart_egIndicatorWidth,Utils.dpToPx(DEF_INDICATOR_WIDTH));
    mIndicatorLineColor=a.getColor(R.styleable.ValueLineChart_egIndicatorLineColor,DEF_INDICATOR_COLOR);
    mIndicatorTextColor=a.getColor(R.styleable.ValueLineChart_egIndicatorTextColor,DEF_INDICATOR_COLOR);
    mIndicatorTextSize=a.getDimension(R.styleable.ValueLineChart_egIndicatorWidth,Utils.dpToPx(DEF_INDICATOR_TEXT_SIZE));
    mIndicatorLeftPadding=a.getDimension(R.styleable.ValueLineChart_egIndicatorLeftPadding,Utils.dpToPx(DEF_INDICATOR_LEFT_PADDING));
    mIndicatorTopPadding=a.getDimension(R.styleable.ValueLineChart_egIndicatorTopPadding,Utils.dpToPx(DEF_INDICATOR_TOP_PADDING));
    mShowStandardValue=a.getBoolean(R.styleable.ValueLineChart_egShowStandardValue,DEF_SHOW_STANDARD_VALUE);
    mStandardValueIndicatorStroke=a.getDimension(R.styleable.ValueLineChart_egStandardValueIndicatorStroke,Utils.dpToPx(DEF_STANDARD_VALUE_INDICATOR_STROKE));
    mStandardValueColor=a.getColor(R.styleable.ValueLineChart_egStandardValueColor,DEF_STANDARD_VALUE_COLOR);
    mXAxisStroke=a.getDimension(R.styleable.ValueLineChart_egXAxisStroke,Utils.dpToPx(DEF_X_AXIS_STROKE));
    mActivateIndicatorShadow=a.getBoolean(R.styleable.ValueLineChart_egActivateIndicatorShadow,DEF_ACTIVATE_INDICATOR_SHADOW);
    mIndicatorShadowStrength=a.getDimension(R.styleable.ValueLineChart_egIndicatorShadowStrength,Utils.dpToPx(DEF_INDICATOR_SHADOW_STRENGTH));
    mIndicatorShadowColor=a.getColor(R.styleable.ValueLineChart_egIndicatorShadowColor,DEF_INDICATOR_SHADOW_COLOR);
    mIndicatorTextUnit=a.getString(R.styleable.ValueLineChart_egIndicatorTextUnit);
    mShowLegendBeneathIndicator=a.getBoolean(R.styleable.ValueLineChart_egShowLegendBeneathIndicator,DEF_SHOW_LEGEND_BENEATH_INDICATOR);
  }
  finally {
    a.recycle();
  }
  if (mIndicatorTextUnit == null) {
    mIndicatorTextUnit="String_Node_Str";
  }
  initializeGraph();
}