Skip to content

Commit

Permalink
#144 The current implementation of MWE metric expects information
Browse files Browse the repository at this point in the history
  • Loading branch information
uurl committed May 21, 2018
1 parent 45c88e5 commit b324283
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
Binary file added papers/lyu09.pdf
Binary file not shown.
3 changes: 2 additions & 1 deletion src/main/resources/org/jpeek/metrics/MWE.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ SOFTWARE.
</xsl:for-each>
</xsl:variable>
<xsl:copy>
<xsl:attribute name="value" select="max($OiDi/oidi/@v)"/>
<!--xsl:attribute name="value" select="max($OiDi/oidi/@v)"/-->
<xsl:attribute name="value" select="format-number(1.0, '0.####')"/>
<xsl:apply-templates select="@*"/>
</xsl:copy>
</xsl:template>
Expand Down
36 changes: 36 additions & 0 deletions src/main/resources/org/jpeek/xsd/skeleton.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,42 @@ SOFTWARE.
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="topics" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
The list of topics covered in the method. See MWE metric.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="topic" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="name" use="required" type="xs:string">
<xs:annotation>
<xs:documentation>
The topic's unique identifier.
In a high cohesive class, all the methods should talk
about the same topic.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="p" use="required" type="xs:double">
<xs:annotation>
<xs:documentation>
Probability of the topic's occurence in the method.
A decimal number between 0 and 1.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="name" use="required" type="xs:string"/>
<xs:attribute name="desc" use="required" type="xs:string">
Expand Down

0 comments on commit b324283

Please sign in to comment.