// Path: stylechecker/src/main/java/com/sqatntu/metrics/Benchmark.java
// public class Benchmark {
//   public static final int LINE_OF_CODE = 200;
//   public static final int DEPTH_OF_CONDITION_NESTING = 3;
//   public static final int AVERAGE_LENGTH_OF_IDENTIFIER = 17;
//   public static final int NUMBER_OF_ATTRIBUTES = 6;
//   public static final int NUMBER_OF_METHODS = 10;
// }
// 
// Path: stylechecker/src/main/java/com/sqatntu/metrics/ScoreCalculator.java
// public class ScoreCalculator {
//   public static float calculateScore(int value, int benchmark) {
//     if (value <= benchmark) {
//       return 100f;
//     } else if (value <= 4f * benchmark) {
//       return (((-1f / (3f * benchmark)) * value) + (4f / 3f)) * 100f;
//     } else {
//       return 0;
//     }
//   }
// }


import java.util.List;
import com.sqatntu.metrics.Benchmark;
import com.sqatntu.metrics.ScoreCalculator;
import java.util.ArrayList;

  public void addNumberOfAttributes(int numberOfAttributes) {
    this.numberOfAttributes += numberOfAttributes;
  }

  public float getAnalysabilityPercentage() {
    return getAverage(
        getScore(getNumberOfLines(), Benchmark.LINE_OF_CODE),
        getScore(getDepthOfConditionNesting(), Benchmark.DEPTH_OF_CONDITION_NESTING),
        getScore(getAverageLengthOfIdentifier(), Benchmark.AVERAGE_LENGTH_OF_IDENTIFIER),
        getScore(getNumberOfAttributes(), Benchmark.NUMBER_OF_ATTRIBUTES),
        getScore(getNumberOfMethods(), Benchmark.NUMBER_OF_METHODS)
    );
  }

  public float getTestabilityPercentage() {
    return getAverage(
        getScore(getNumberOfLines(), Benchmark.LINE_OF_CODE),
        getScore(getDepthOfConditionNesting(), Benchmark.DEPTH_OF_CONDITION_NESTING)
    );
  }

  public float getOverallPercentage() {
    return getAverage(
        getAnalysabilityPercentage(),
        getTestabilityPercentage()
    );
  }

  private float getScore(int value, int benchmark) {
// Path: stylechecker/src/main/java/com/sqatntu/metrics/Benchmark.java
// public class Benchmark {
//   public static final int LINE_OF_CODE = 200;
//   public static final int DEPTH_OF_CONDITION_NESTING = 3;
//   public static final int AVERAGE_LENGTH_OF_IDENTIFIER = 17;
//   public static final int NUMBER_OF_ATTRIBUTES = 6;
//   public static final int NUMBER_OF_METHODS = 10;
// }
// 
// Path: stylechecker/src/main/java/com/sqatntu/metrics/ScoreCalculator.java
// public class ScoreCalculator {
//   public static float calculateScore(int value, int benchmark) {
//     if (value <= benchmark) {
//       return 100f;
//     } else if (value <= 4f * benchmark) {
//       return (((-1f / (3f * benchmark)) * value) + (4f / 3f)) * 100f;
//     } else {
//       return 0;
//     }
//   }
// }


// Path: stylechecker/src/main/java/com/sqatntu/metrics/report/MetricReport.java
import java.util.List;
import com.sqatntu.metrics.Benchmark;
import com.sqatntu.metrics.ScoreCalculator;
import java.util.ArrayList;


  public void addNumberOfAttributes(int numberOfAttributes) {
    this.numberOfAttributes += numberOfAttributes;
  }

  public float getAnalysabilityPercentage() {
    return getAverage(
        getScore(getNumberOfLines(), Benchmark.LINE_OF_CODE),
        getScore(getDepthOfConditionNesting(), Benchmark.DEPTH_OF_CONDITION_NESTING),
        getScore(getAverageLengthOfIdentifier(), Benchmark.AVERAGE_LENGTH_OF_IDENTIFIER),
        getScore(getNumberOfAttributes(), Benchmark.NUMBER_OF_ATTRIBUTES),
        getScore(getNumberOfMethods(), Benchmark.NUMBER_OF_METHODS)
    );
  }

  public float getTestabilityPercentage() {
    return getAverage(
        getScore(getNumberOfLines(), Benchmark.LINE_OF_CODE),
        getScore(getDepthOfConditionNesting(), Benchmark.DEPTH_OF_CONDITION_NESTING)
    );
  }

  public float getOverallPercentage() {
    return getAverage(
        getAnalysabilityPercentage(),
        getTestabilityPercentage()
    );
  }

  private float getScore(int value, int benchmark) {
    return ScoreCalculator.calculateScore(value, benchmark);