test_class.declarator: comp
test_class.modifier: private
test_class.original_string: private LongestCommonSubstring comp;
test_class.type: LongestCommonSubstring
test_class.var_name: comp
test_class.file: lib/Duke/duke-core/src/test/java/no/priv/garshol/duke/comparators/LongestCommonSubstringTest.java
test_class.identifier: LongestCommonSubstringTest
test_case.body: @Test
    public void testComparatorEqual() {
      assertEquals(1.0, comp.compare("foo", "foo"));
    }
test_case.class_method_signature: LongestCommonSubstringTest.testComparatorEqual()
test_case.full_signature: @Test public void testComparatorEqual()
test_case.identifier: testComparatorEqual
test_case.invocations: assertEquals compare
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testComparatorEqual()
focal_class.declarator: minlen = 2
focal_class.modifier: private
focal_class.original_string: private int minlen = 2;
focal_class.type: int
focal_class.var_name: minlen
focal_class.declarator: formula = Formula.OVERLAP
focal_class.modifier: private
focal_class.original_string: private Formula formula = Formula.OVERLAP;
focal_class.type: Formula
focal_class.var_name: formula
focal_class.file: lib/Duke/duke-core/src/main/java/no/priv/garshol/duke/comparators/LongestCommonSubstring.java
focal_class.identifier: LongestCommonSubstring
focal_class.interfaces: implements Comparator
focal_class.class_method_signature: LongestCommonSubstring.compare(String s1, String s2)
focal_class.full_signature: @Override public double compare(String s1, String s2)
focal_class.identifier: compare
focal_class.modifiers: @Override public
focal_class.parameters: (String s1, String s2)
focal_class.return: double
focal_class.signature: double compare(String s1, String s2)
focal_class.class_method_signature: LongestCommonSubstring.compare_(String s1, String s2)
focal_class.full_signature: private double compare_(String s1, String s2)
focal_class.identifier: compare_
focal_class.modifiers: private
focal_class.parameters: (String s1, String s2)
focal_class.return: double
focal_class.signature: double compare_(String s1, String s2)
focal_class.class_method_signature: LongestCommonSubstring.isTokenized()
focal_class.full_signature: @Override public boolean isTokenized()
focal_class.identifier: isTokenized
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isTokenized()
focal_class.class_method_signature: LongestCommonSubstring.setMinimumLength(int minlen)
focal_class.full_signature: public void setMinimumLength(int minlen)
focal_class.identifier: setMinimumLength
focal_class.modifiers: public
focal_class.parameters: (int minlen)
focal_class.return: void
focal_class.signature: void setMinimumLength(int minlen)
focal_class.class_method_signature: LongestCommonSubstring.getMinimumLength()
focal_class.full_signature: public int getMinimumLength()
focal_class.identifier: getMinimumLength
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getMinimumLength()
focal_class.class_method_signature: LongestCommonSubstring.setFormula(Formula formula)
focal_class.full_signature: public void setFormula(Formula formula)
focal_class.identifier: setFormula
focal_class.modifiers: public
focal_class.parameters: (Formula formula)
focal_class.return: void
focal_class.signature: void setFormula(Formula formula)
focal_class.class_method_signature: LongestCommonSubstring.getFormula()
focal_class.full_signature: public Formula getFormula()
focal_class.identifier: getFormula
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Formula
focal_class.signature: Formula getFormula()
focal_method.body: @Override
  public double compare(String s1, String s2) {
      // a couple of quick cutoffs
      if (s1.equals(s2))
        return 1.0;
      if (Math.min(s1.length(), s2.length()) == 0)
        return 0.0;
  
      // the results of the algorithm depends on the order of the input
      // strings.  therefore need a sub-method for this computation
      return (compare_(s1, s2) + compare_(s2, s1)) / 2.0;
    }
focal_method.class_method_signature: LongestCommonSubstring.compare(String s1, String s2)
focal_method.full_signature: @Override public double compare(String s1, String s2)
focal_method.identifier: compare
focal_method.invocations: equals min length length compare_ compare_
focal_method.modifiers: @Override public
focal_method.parameters: (String s1, String s2)
focal_method.return: double
focal_method.signature: double compare(String s1, String s2)