diff --git a/.besouro/20161005150110246/actions.txt b/.besouro/20161005150110246/actions.txt new file mode 100644 index 0000000..c9633c1 --- /dev/null +++ b/.besouro/20161005150110246/actions.txt @@ -0,0 +1,80 @@ +FileOpenedAction 1475668870473 TestRomanNumerals.java 318 1 2 1 +RefactoringAction 1475669518241 TestRomanNumerals.java ADD void is FIELD +RefactoringAction 1475669527273 TestRomanNumerals.java RENAME is=>void is_subtraction FIELD +RefactoringAction 1475669532803 TestRomanNumerals.java RENAME is_subtraction=>void issubtraction FIELD +RefactoringAction 1475669534332 TestRomanNumerals.java RENAME issubtraction=>void isSubtraction FIELD +RefactoringAction 1475669536361 TestRomanNumerals.java RENAME isSubtraction=>void isSubtraction() METHOD +RefactoringAction 1475669814220 TestRomanNumerals.java ADD import org.junit.runner.RunWith IMPORT +RefactoringAction 1475669822533 TestRomanNumerals.java ADD import org.junit.runners.Parameterized IMPORT +EditAction 1475669828562 TestRomanNumerals.java 465 2 2 1 +RefactoringAction 1475670082177 TestRomanNumerals.java ADD TestRomanNumerals() METHOD +RefactoringAction 1475670131215 TestRomanNumerals.java ADD String test FIELD +RefactoringAction 1475670138237 TestRomanNumerals.java RENAME test=>String roman FIELD +RefactoringAction 1475670144264 TestRomanNumerals.java RENAME roman=>String romanTestNum FIELD +RefactoringAction 1475670167359 TestRomanNumerals.java RENAME TestRomanNumerals()=>TestRomanNumerals(String) METHOD +EditAction 1475670175862 TestRomanNumerals.java 578 3 3 1 +RefactoringAction 1475670267647 TestRomanNumerals.java ADD static Collectionvoid sub() METHOD +RefactoringAction 1475670481152 TestRomanNumerals.java RENAME sub()=>void subtraction() METHOD +RefactoringAction 1475670489167 TestRomanNumerals.java RENAME subtraction()=>void findSubtraction() METHOD +EditAction 1475670533560 TestRomanNumerals.java 756 2 3 1 +CompilationAction 1475670533798 TestRomanNumerals.java +CompilationAction 1475670533799 TestRomanNumerals.java +CompilationAction 1475670594345 TestRomanNumerals.java +CompilationAction 1475670594510 TestRomanNumerals.java +CompilationAction 1475670609518 TestRomanNumerals.java +RefactoringAction 1475670759716 TestRomanNumerals.java RENAME findSubtraction()=>void subtractionOccurs() METHOD +CompilationAction 1475671016290 TestRomanNumerals.java +CompilationAction 1475671016452 TestRomanNumerals.java +CompilationAction 1475671016452 TestRomanNumerals.java +CompilationAction 1475671016452 TestRomanNumerals.java +CompilationAction 1475671036851 TestRomanNumerals.java +CompilationAction 1475671036851 TestRomanNumerals.java +CompilationAction 1475671037013 TestRomanNumerals.java +CompilationAction 1475671037014 TestRomanNumerals.java +CompilationAction 1475671070421 TestRomanNumerals.java +CompilationAction 1475671070421 TestRomanNumerals.java +CompilationAction 1475671070580 TestRomanNumerals.java +EditAction 1475671112065 TestRomanNumerals.java 1127 2 2 1 +CompilationAction 1475671112303 TestRomanNumerals.java +CompilationAction 1475671112303 TestRomanNumerals.java +CompilationAction 1475671118230 TestRomanNumerals.java +CompilationAction 1475671118399 TestRomanNumerals.java +CompilationAction 1475671118405 TestRomanNumerals.java +EditAction 1475671132497 TestRomanNumerals.java 1130 2 8 2 +CompilationAction 1475671132747 TestRomanNumerals.java +CompilationAction 1475674175275 TestRomanNumerals.java +CompilationAction 1475674175803 TestRomanNumerals.java +CompilationAction 1475674188546 TestRomanNumerals.java +CompilationAction 1475674188709 TestRomanNumerals.java +RefactoringAction 1475674274498 RomanNumerals.java ADD boolean isSubtraction FIELD +RefactoringAction 1475674280504 RomanNumerals.java RENAME isSubtraction=>boolean isSubtraction() METHOD +EditAction 1475674285604 RomanNumerals.java 321 2 2 0 +CompilationAction 1475674285815 RomanNumerals.java +CompilationAction 1475674285816 RomanNumerals.java +CompilationAction 1475674285816 RomanNumerals.java +CompilationAction 1475674285816 TestRomanNumerals.java +RefactoringAction 1475674326020 RomanNumerals.java RENAME isSubtraction()=>boolean isSubtraction(String) METHOD +CompilationAction 1475674348253 TestRomanNumerals.java +CompilationAction 1475674348411 TestRomanNumerals.java +CompilationAction 1475674456357 RomanNumerals.java +CompilationAction 1475674456357 RomanNumerals.java +CompilationAction 1475674456357 RomanNumerals.java +CompilationAction 1475674456524 RomanNumerals.java +EditAction 1475674697270 RomanNumerals.java 476 2 4 0 +CompilationAction 1475674697491 RomanNumerals.java +CompilationAction 1475674697491 RomanNumerals.java +CompilationAction 1475674697492 RomanNumerals.java +CompilationAction 1475674904220 RomanNumerals.java +CompilationAction 1475674904221 RomanNumerals.java +CompilationAction 1475674904386 RomanNumerals.java diff --git a/.besouro/20161005150110246/besouroEpisodes.txt b/.besouro/20161005150110246/besouroEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161005150110246/disagreements.txt b/.besouro/20161005150110246/disagreements.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161005150110246/randomHeuristicEpisodes.txt b/.besouro/20161005150110246/randomHeuristicEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161005150110246/userComments.txt b/.besouro/20161005150110246/userComments.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161005150110246/zorroEpisodes.txt b/.besouro/20161005150110246/zorroEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161011222626759/actions.txt b/.besouro/20161011222626759/actions.txt new file mode 100644 index 0000000..bd724f9 --- /dev/null +++ b/.besouro/20161011222626759/actions.txt @@ -0,0 +1,310 @@ +FileOpenedAction 1476213987195 TestRomanNumerals.java 1199 2 9 2 +RefactoringAction 1476214090680 RomanNumerals.java RENAME isSubtraction(String)=>boolean isSubtraction(String, int) METHOD +EditAction 1476214240697 RomanNumerals.java 519 2 4 0 +CompilationAction 1476214241048 TestRomanNumerals.java +EditAction 1476214534972 RomanNumerals.java 766 2 2 0 +CompilationAction 1476214535133 RomanNumerals.java +CompilationAction 1476214535134 RomanNumerals.java +EditAction 1476214617778 RomanNumerals.java 766 2 2 0 +CompilationAction 1476214617932 RomanNumerals.java +CompilationAction 1476214617934 RomanNumerals.java +CompilationAction 1476214666993 RomanNumerals.java +CompilationAction 1476214666994 RomanNumerals.java +CompilationAction 1476214667164 RomanNumerals.java +CompilationAction 1476214704531 RomanNumerals.java +CompilationAction 1476214704748 RomanNumerals.java +CompilationAction 1476214750378 RomanNumerals.java +CompilationAction 1476214750558 RomanNumerals.java +CompilationAction 1476214890804 RomanNumerals.java +CompilationAction 1476214890994 RomanNumerals.java +CompilationAction 1476214968993 RomanNumerals.java +CompilationAction 1476214969160 RomanNumerals.java +CompilationAction 1476215095602 RomanNumerals.java +CompilationAction 1476215095763 RomanNumerals.java +CompilationAction 1476215138669 RomanNumerals.java +CompilationAction 1476215138850 TestRomanNumerals.java +EditAction 1476215224256 RomanNumerals.java 801 2 6 0 +EditAction 1476215254000 RomanNumerals.java 801 2 6 0 +EditAction 1476215324347 TestRomanNumerals.java 1199 2 9 2 +CompilationAction 1476215324505 TestRomanNumerals.java +EditAction 1476215343968 TestRomanNumerals.java 1202 2 9 2 +CompilationAction 1476215344115 TestRomanNumerals.java +EditAction 1476215369513 TestRomanNumerals.java 1202 2 9 2 +CompilationAction 1476215369808 TestRomanNumerals.java +CompilationAction 1476215387869 TestRomanNumerals.java +UnitTestCaseAction 1476215409408 TestRomanNumerals.java FAIL +UnitTestSessionAction 1476215409410 TestRomanNumerals.java FAIL +EditAction 1476215459808 TestRomanNumerals.java 1233 2 9 2 +UnitTestCaseAction 1476215463093 TestRomanNumerals.java FAIL +UnitTestSessionAction 1476215463095 TestRomanNumerals.java FAIL +RefactoringAction 1476215998184 RomanNumerals.java ADD RomanNumerals() METHOD +RefactoringAction 1476216022774 RomanNumerals.java ADD Hashtable<> numeralT FIELD +RefactoringAction 1476216023789 RomanNumerals.java RENAME numeralT=>Hashtable<> numeralTable FIELD +RefactoringAction 1476216029805 RomanNumerals.java RENAME numeralTable=>Hashtable<> numTable FIELD +RefactoringAction 1476216043823 RomanNumerals.java REMOVE numTable FIELD +EditAction 1476216043874 RomanNumerals.java 881 3 6 0 +CompilationAction 1476216044018 RomanNumerals.java +CompilationAction 1476216044019 RomanNumerals.java +RefactoringAction 1476216076345 RomanNumerals.java ADD Hashtable numTable FIELD +CompilationAction 1476216078640 RomanNumerals.java +CompilationAction 1476216078641 RomanNumerals.java +CompilationAction 1476216078836 RomanNumerals.java +RefactoringAction 1476216100666 RomanNumerals.java ADD import java.util.Hashtable IMPORT +CompilationAction 1476216108855 RomanNumerals.java +RefactoringAction 1476216170687 RomanNumerals.java ADD void fillHashTable() METHOD +RefactoringAction 1476216185261 RomanNumerals.java RENAME fillHashTable()=>void fillNumTable() METHOD +EditAction 1476216279554 RomanNumerals.java 1378 4 14 0 +CompilationAction 1476216279731 RomanNumerals.java +CompilationAction 1476216279731 RomanNumerals.java +CompilationAction 1476216397180 RomanNumerals.java +CompilationAction 1476216397180 RomanNumerals.java +EditAction 1476216561506 RomanNumerals.java 1444 4 13 0 +CompilationAction 1476216561676 RomanNumerals.java +CompilationAction 1476216561677 RomanNumerals.java +RefactoringAction 1476216662309 RomanNumerals.java ADD void singleNumToInteger() METHOD +RefactoringAction 1476216710902 RomanNumerals.java RENAME singleNumToInteger()=>int singleNumToInteger(String) METHOD +CompilationAction 1476216747739 RomanNumerals.java +CompilationAction 1476216747740 RomanNumerals.java +CompilationAction 1476216747910 RomanNumerals.java +CompilationAction 1476216747910 RomanNumerals.java +CompilationAction 1476216761563 RomanNumerals.java +CompilationAction 1476216761718 RomanNumerals.java +CompilationAction 1476216761719 RomanNumerals.java +EditAction 1476216773263 RomanNumerals.java 1635 5 15 0 +CompilationAction 1476216773550 RomanNumerals.java +CompilationAction 1476216964048 RomanNumerals.java +CompilationAction 1476216964233 RomanNumerals.java +CompilationAction 1476216964233 RomanNumerals.java +CompilationAction 1476217167052 RomanNumerals.java +EditAction 1476217186320 RomanNumerals.java 1865 5 18 0 +CompilationAction 1476217186505 RomanNumerals.java +CompilationAction 1476217239233 RomanNumerals.java +EditAction 1476217280383 RomanNumerals.java 1891 5 18 0 +CompilationAction 1476217280583 RomanNumerals.java +EditAction 1476217339820 RomanNumerals.java 1819 5 21 0 +CompilationAction 1476217340001 RomanNumerals.java +CompilationAction 1476217354249 RomanNumerals.java +EditAction 1476217436847 RomanNumerals.java 1917 5 21 0 +EditAction 1476217449533 RomanNumerals.java 1918 5 21 0 +EditAction 1476217464191 RomanNumerals.java 1940 5 21 0 +UnitTestCaseAction 1476217492012 TestRomanNumerals.java FAIL +UnitTestSessionAction 1476217492012 TestRomanNumerals.java FAIL +UnitTestCaseAction 1476217507630 TestRomanNumerals.java FAIL +UnitTestSessionAction 1476217507630 TestRomanNumerals.java FAIL +EditAction 1476217633140 TestRomanNumerals.java 1235 2 9 2 +EditAction 1476217696590 RomanNumerals.java 2039 5 22 0 +EditAction 1476217719080 RomanNumerals.java 2131 5 23 0 +UnitTestCaseAction 1476217721544 TestRomanNumerals.java FAIL +UnitTestSessionAction 1476217721544 TestRomanNumerals.java FAIL +EditAction 1476217738580 RomanNumerals.java 2129 5 23 0 +UnitTestCaseAction 1476217741066 TestRomanNumerals.java FAIL +UnitTestSessionAction 1476217741067 TestRomanNumerals.java FAIL +EditAction 1476217782519 RomanNumerals.java 2132 5 17 0 +CompilationAction 1476217782801 RomanNumerals.java +UnitTestCaseAction 1476217799654 TestRomanNumerals.java FAIL +UnitTestSessionAction 1476217799654 TestRomanNumerals.java FAIL +EditAction 1476217897624 RomanNumerals.java 2149 5 23 0 +UnitTestCaseAction 1476217903107 TestRomanNumerals.java FAIL +UnitTestSessionAction 1476217903108 TestRomanNumerals.java FAIL +EditAction 1476217996680 RomanNumerals.java 2219 5 25 0 +UnitTestCaseAction 1476217998880 TestRomanNumerals.java FAIL +UnitTestSessionAction 1476217998880 TestRomanNumerals.java FAIL +EditAction 1476218076097 TestRomanNumerals.java 1240 2 9 2 +CompilationAction 1476218076381 TestRomanNumerals.java +CompilationAction 1476218144056 TestRomanNumerals.java +UnitTestCaseAction 1476218146238 TestRomanNumerals.java FAIL +UnitTestSessionAction 1476218146238 TestRomanNumerals.java FAIL +EditAction 1476218174808 TestRomanNumerals.java 1391 2 9 2 +UnitTestCaseAction 1476218176885 TestRomanNumerals.java FAIL +UnitTestSessionAction 1476218176885 TestRomanNumerals.java FAIL +EditAction 1476218266376 TestRomanNumerals.java 1387 2 9 2 +UnitTestCaseAction 1476218268242 TestRomanNumerals.java OK +UnitTestSessionAction 1476218268243 TestRomanNumerals.java OK +EditAction 1476218294522 TestRomanNumerals.java 1232 2 9 2 +EditAction 1476218301042 RomanNumerals.java 2018 5 23 0 +UnitTestCaseAction 1476218304474 TestRomanNumerals.java OK +UnitTestSessionAction 1476218304475 TestRomanNumerals.java OK +EditAction 1476218313088 RomanNumerals.java 1946 5 21 0 +UnitTestCaseAction 1476218315352 TestRomanNumerals.java OK +UnitTestSessionAction 1476218315352 TestRomanNumerals.java OK +RefactoringAction 1476218747070 TestRomanNumerals.java ADD void test() METHOD +RefactoringAction 1476218800082 TestRomanNumerals.java RENAME test()=>void max() METHOD +RefactoringAction 1476218803593 TestRomanNumerals.java RENAME max()=> null +RefactoringAction 1476218805601 TestRomanNumerals.java RENAME =>void repeating() METHOD +RefactoringAction 1476218911116 TestRomanNumerals.java RENAME repeating()=>void repeating_() METHOD +RefactoringAction 1476218913626 TestRomanNumerals.java RENAME repeating_()=>void repeating() METHOD +RefactoringAction 1476218921634 TestRomanNumerals.java RENAME repeating()=>void triple_repeating() METHOD +RefactoringAction 1476218927643 TestRomanNumerals.java RENAME triple_repeating()=>void max_triple_repeating() METHOD +RefactoringAction 1476218936151 TestRomanNumerals.java RENAME max_triple_repeating()=>void maxThreeepeating() METHOD +RefactoringAction 1476218937159 TestRomanNumerals.java RENAME maxThreeepeating()=>void maxThreeRepeating() METHOD +RefactoringAction 1476218939667 TestRomanNumerals.java RENAME maxThreeRepeating()=>void maxThreeRepeats() METHOD +EditAction 1476219918399 TestRomanNumerals.java 1620 3 15 2 +CompilationAction 1476219918582 TestRomanNumerals.java +CompilationAction 1476219918583 TestRomanNumerals.java +CompilationAction 1476220129591 TestRomanNumerals.java +CompilationAction 1476220129593 TestRomanNumerals.java +CompilationAction 1476220129753 TestRomanNumerals.java +CompilationAction 1476220129753 TestRomanNumerals.java +EditAction 1476220186911 TestRomanNumerals.java 1750 3 16 3 +CompilationAction 1476220187056 TestRomanNumerals.java +RefactoringAction 1476220209521 RomanNumerals.java ADD boolean repeatingOK(String) METHOD +EditAction 1476220218287 RomanNumerals.java 2048 6 22 0 +UnitTestCaseAction 1476220224949 TestRomanNumerals.java FAIL +UnitTestSessionAction 1476220224949 TestRomanNumerals.java FAIL +RefactoringAction 1476220316023 RomanNumerals.java RENAME repeatingOK(String)=>boolean repeatingOk(String) METHOD +RefactoringAction 1476220318531 RomanNumerals.java RENAME repeatingOk(String)=>boolean repeatingOkOneSymbols(String) METHOD +CompilationAction 1476220318827 TestRomanNumerals.java +EditAction 1476220320687 TestRomanNumerals.java 1760 3 16 3 +UnitTestCaseAction 1476220322736 TestRomanNumerals.java FAIL +UnitTestSessionAction 1476220322737 TestRomanNumerals.java FAIL +RefactoringAction 1476220441208 RomanNumerals.java ADD boolean isOneSymbol() METHOD +RefactoringAction 1476220488790 RomanNumerals.java RENAME isOneSymbol()=>boolean isOneSymbol(String) METHOD +CompilationAction 1476220552931 RomanNumerals.java +CompilationAction 1476220552932 RomanNumerals.java +CompilationAction 1476220552932 RomanNumerals.java +CompilationAction 1476220552932 RomanNumerals.java +CompilationAction 1476220726346 RomanNumerals.java +CompilationAction 1476220726513 RomanNumerals.java +CompilationAction 1476220726514 RomanNumerals.java +CompilationAction 1476220726514 RomanNumerals.java +CompilationAction 1476220726514 RomanNumerals.java +CompilationAction 1476220728400 RomanNumerals.java +CompilationAction 1476220728569 RomanNumerals.java +CompilationAction 1476220728570 RomanNumerals.java +CompilationAction 1476220728571 RomanNumerals.java +CompilationAction 1476220728572 RomanNumerals.java +CompilationAction 1476220751111 RomanNumerals.java +CompilationAction 1476220751274 RomanNumerals.java +CompilationAction 1476220751274 RomanNumerals.java +CompilationAction 1476220751274 RomanNumerals.java +CompilationAction 1476220751275 RomanNumerals.java +EditAction 1476220813850 RomanNumerals.java 2478 7 25 0 +CompilationAction 1476220814020 RomanNumerals.java +CompilationAction 1476220814020 RomanNumerals.java +CompilationAction 1476220814021 RomanNumerals.java +CompilationAction 1476220827975 RomanNumerals.java +CompilationAction 1476220828155 RomanNumerals.java +CompilationAction 1476220828155 RomanNumerals.java +CompilationAction 1476220866519 RomanNumerals.java +CompilationAction 1476220866710 RomanNumerals.java +CompilationAction 1476220927127 RomanNumerals.java +CompilationAction 1476220927293 RomanNumerals.java +CompilationAction 1476220946199 RomanNumerals.java +CompilationAction 1476220946377 TestRomanNumerals.java +EditAction 1476221000078 RomanNumerals.java 2671 7 28 0 +CompilationAction 1476221025098 TestRomanNumerals.java +UnitTestCaseAction 1476221028090 TestRomanNumerals.java OK +UnitTestSessionAction 1476221028091 TestRomanNumerals.java OK +RefactoringAction 1476221279507 TestRomanNumerals.java ADD void fiveSymbols FIELD +RefactoringAction 1476221282514 TestRomanNumerals.java RENAME fiveSymbols=>void fiveSymbolsNotRepeated FIELD +RefactoringAction 1476221286526 TestRomanNumerals.java RENAME fiveSymbolsNotRepeated=>void fiveSymbolsNotRepeated() METHOD +EditAction 1476221556366 TestRomanNumerals.java 2319 4 16 3 +CompilationAction 1476221556517 TestRomanNumerals.java +CompilationAction 1476221556517 TestRomanNumerals.java +CompilationAction 1476221622135 TestRomanNumerals.java +CompilationAction 1476221622135 TestRomanNumerals.java +CompilationAction 1476221622298 TestRomanNumerals.java +RefactoringAction 1476221640999 RomanNumerals.java ADD boolean repeatingOkFiveSymbols(String) METHOD +EditAction 1476221648158 RomanNumerals.java 2784 8 29 0 +UnitTestCaseAction 1476221652856 TestRomanNumerals.java FAIL +UnitTestSessionAction 1476221652857 TestRomanNumerals.java FAIL +RefactoringAction 1476221873309 RomanNumerals.java ADD boolean isFiveSymbol FIELD +RefactoringAction 1476221875818 RomanNumerals.java RENAME isFiveSymbol=>boolean isFiveSymbol() METHOD +CompilationAction 1476221896859 RomanNumerals.java +CompilationAction 1476221904392 RomanNumerals.java +CompilationAction 1476221923314 RomanNumerals.java +CompilationAction 1476221979646 RomanNumerals.java +CompilationAction 1476221999310 RomanNumerals.java +CompilationAction 1476221999499 RomanNumerals.java +EditAction 1476222104167 RomanNumerals.java 3299 9 34 0 +CompilationAction 1476222104316 RomanNumerals.java +CompilationAction 1476222155917 RomanNumerals.java +CompilationAction 1476222156080 RomanNumerals.java +CompilationAction 1476222221063 RomanNumerals.java +CompilationAction 1476222221259 RomanNumerals.java +CompilationAction 1476222240831 RomanNumerals.java +CompilationAction 1476222241010 TestRomanNumerals.java +CompilationAction 1476222256287 TestRomanNumerals.java +UnitTestCaseAction 1476222261722 TestRomanNumerals.java FAIL +UnitTestSessionAction 1476222261722 TestRomanNumerals.java FAIL +EditAction 1476222337241 RomanNumerals.java 3506 9 35 0 +UnitTestCaseAction 1476222341075 TestRomanNumerals.java FAIL +UnitTestSessionAction 1476222341076 TestRomanNumerals.java FAIL +EditAction 1476222613287 RomanNumerals.java 3595 9 35 0 +UnitTestCaseAction 1476222618653 TestRomanNumerals.java FAIL +UnitTestSessionAction 1476222618654 TestRomanNumerals.java FAIL +EditAction 1476222647424 RomanNumerals.java 3623 9 35 0 +UnitTestCaseAction 1476222654166 TestRomanNumerals.java FAIL +UnitTestSessionAction 1476222654166 TestRomanNumerals.java FAIL +EditAction 1476222746943 RomanNumerals.java 3685 9 35 0 +UnitTestCaseAction 1476222750701 TestRomanNumerals.java FAIL +UnitTestSessionAction 1476222750702 TestRomanNumerals.java FAIL +EditAction 1476222959422 RomanNumerals.java 3779 9 36 0 +UnitTestCaseAction 1476222966660 TestRomanNumerals.java FAIL +UnitTestSessionAction 1476222966661 TestRomanNumerals.java FAIL +EditAction 1476223023264 RomanNumerals.java 3784 9 36 0 +UnitTestCaseAction 1476223026581 TestRomanNumerals.java FAIL +UnitTestSessionAction 1476223026582 TestRomanNumerals.java FAIL +EditAction 1476223212258 RomanNumerals.java 3790 9 36 0 +UnitTestCaseAction 1476223217524 TestRomanNumerals.java FAIL +UnitTestSessionAction 1476223217525 TestRomanNumerals.java FAIL +EditAction 1476223287759 RomanNumerals.java 3852 9 36 0 +UnitTestCaseAction 1476223291482 TestRomanNumerals.java FAIL +UnitTestSessionAction 1476223291483 TestRomanNumerals.java FAIL +EditAction 1476223331479 RomanNumerals.java 3852 9 36 0 +UnitTestCaseAction 1476223344508 TestRomanNumerals.java FAIL +UnitTestSessionAction 1476223344508 TestRomanNumerals.java FAIL +EditAction 1476223408543 RomanNumerals.java 3947 9 37 0 +UnitTestCaseAction 1476223413788 TestRomanNumerals.java FAIL +UnitTestSessionAction 1476223413789 TestRomanNumerals.java FAIL +EditAction 1476223432863 RomanNumerals.java 3947 9 37 0 +UnitTestCaseAction 1476223436081 TestRomanNumerals.java FAIL +UnitTestSessionAction 1476223436082 TestRomanNumerals.java FAIL +EditAction 1476223482209 RomanNumerals.java 3947 9 37 0 +UnitTestCaseAction 1476223499473 TestRomanNumerals.java OK +UnitTestSessionAction 1476223499473 TestRomanNumerals.java OK +EditAction 1476223526247 RomanNumerals.java 3704 9 37 0 +EditAction 1476223636311 RomanNumerals.java 3772 9 37 0 +CompilationAction 1476223636458 RomanNumerals.java +EditAction 1476223669230 RomanNumerals.java 3806 9 37 0 +EditAction 1476223679582 RomanNumerals.java 3819 9 38 0 +UnitTestCaseAction 1476223700474 TestRomanNumerals.java OK +UnitTestSessionAction 1476223700474 TestRomanNumerals.java OK +EditAction 1476223812903 RomanNumerals.java 3912 9 38 0 +EditAction 1476223844224 RomanNumerals.java 3851 9 39 0 +UnitTestCaseAction 1476223849422 TestRomanNumerals.java OK +UnitTestSessionAction 1476223849423 TestRomanNumerals.java OK +RefactoringAction 1476224094213 RomanNumerals.java ADD String FIELD +RefactoringAction 1476224098223 RomanNumerals.java RENAME roman=>String FIELD +RefactoringAction 1476224184916 RomanNumerals.java ADD int FIELD +RefactoringAction 1476224193927 RomanNumerals.java REMOVE roman FIELD +EditAction 1476224194262 RomanNumerals.java 3919 9 39 0 +RefactoringAction 1476224287030 RomanNumerals.java ADD int FIELD +RefactoringAction 1476224347143 RomanNumerals.java RENAME numTable=>Hashtable indexTable FIELD +CompilationAction 1476224367948 RomanNumerals.java +CompilationAction 1476224376191 RomanNumerals.java +UnitTestCaseAction 1476224390705 TestRomanNumerals.java FAIL +UnitTestSessionAction 1476224390706 TestRomanNumerals.java FAIL +UnitTestCaseAction 1476224498221 TestRomanNumerals.java OK +UnitTestSessionAction 1476224498222 TestRomanNumerals.java OK +EditAction 1476224647031 RomanNumerals.java 4110 9 39 0 +CompilationAction 1476224647179 RomanNumerals.java +CompilationAction 1476224816937 RomanNumerals.java +CompilationAction 1476224817103 RomanNumerals.java +CompilationAction 1476224889600 RomanNumerals.java +EditAction 1476224926648 RomanNumerals.java 4300 9 40 0 +UnitTestCaseAction 1476224930258 TestRomanNumerals.java FAIL +UnitTestSessionAction 1476224930259 TestRomanNumerals.java FAIL +EditAction 1476225086118 RomanNumerals.java 4417 9 33 0 +CompilationAction 1476225086318 RomanNumerals.java +CompilationAction 1476225127678 RomanNumerals.java +UnitTestCaseAction 1476225130410 TestRomanNumerals.java FAIL +UnitTestSessionAction 1476225130411 TestRomanNumerals.java FAIL +UnitTestCaseAction 1476225169182 TestRomanNumerals.java FAIL +UnitTestSessionAction 1476225169183 TestRomanNumerals.java FAIL +EditAction 1476225212567 RomanNumerals.java 4420 9 41 0 +EditAction 1476225217498 RomanNumerals.java 4424 9 41 0 +UnitTestCaseAction 1476225220497 TestRomanNumerals.java OK +UnitTestSessionAction 1476225220498 TestRomanNumerals.java OK +EditAction 1476225232269 RomanNumerals.java 4304 9 40 0 +EditAction 1476225236600 RomanNumerals.java 4255 9 40 0 diff --git a/.besouro/20161011222626759/besouroEpisodes.txt b/.besouro/20161011222626759/besouroEpisodes.txt new file mode 100644 index 0000000..a58a158 --- /dev/null +++ b/.besouro/20161011222626759/besouroEpisodes.txt @@ -0,0 +1,201 @@ +1476218268243 production 1 4281 false +1476218268244 refactoring 2A 4281 true +1476218268245 production 3 4281 false +1476218268246 production 2 4281 false +1476218304475 refactoring 2A 9 true +1476218315352 refactoring 2A 2 true +1476221028091 test-first 1 2281 true +1476221028092 test-first 1 2281 true +1476221028093 test-first 1 2281 true +1476221028094 test-first 1 2281 true +1476221028095 test-first 1 2281 true +1476221028096 test-first 1 2281 true +1476221028097 test-first 1 2281 true +1476221028098 test-first 1 2281 true +1476221028099 test-first 1 2281 true +1476221028100 test-first 1 2281 true +1476221028101 test-first 1 2281 true +1476221028102 test-first 1 2281 true +1476221028103 test-first 1 2281 true +1476221028104 test-first 1 2281 true +1476221028105 test-first 1 2281 true +1476221028106 test-first 1 2281 true +1476221028107 test-first 1 2281 true +1476221028108 test-first 1 2281 true +1476221028109 test-first 1 2281 true +1476221028110 test-first 1 2281 true +1476221028111 test-first 1 2281 true +1476221028112 test-first 1 2281 true +1476221028113 test-first 1 2281 true +1476221028114 test-first 1 2281 true +1476221028115 test-first 1 2281 true +1476221028116 test-first 1 2281 true +1476221028117 test-first 1 2281 true +1476221028118 test-first 1 2281 true +1476221028119 test-first 1 2281 true +1476221028120 test-first 1 2281 true +1476221028121 test-first 1 2281 true +1476221028122 test-first 1 2281 true +1476221028123 test-first 1 2281 true +1476221028124 test-first 1 2281 true +1476221028125 test-first 1 2281 true +1476221028126 test-first 1 2281 true +1476221028127 test-first 1 2281 true +1476221028128 test-first 1 2281 true +1476221028129 test-first 1 2281 true +1476221028130 test-first 1 2281 true +1476221028131 test-first 1 2281 true +1476221028132 test-first 1 2281 true +1476221028133 test-first 1 2281 true +1476221028134 test-first 1 2281 true +1476221028135 test-first 1 2281 true +1476221028136 test-first 1 2281 true +1476221028137 test-first 1 2281 true +1476221028138 test-first 1 2281 true +1476221028139 test-first 1 2281 true +1476221028140 test-first 1 2281 true +1476221028141 test-first 1 2281 true +1476221028142 test-first 1 2281 true +1476221028143 test-first 1 2281 true +1476221028144 test-first 1 2281 true +1476221028145 test-first 1 2281 true +1476221028146 test-first 1 2281 true +1476221028147 test-first 1 2281 true +1476221028148 test-first 1 2281 true +1476221028149 test-first 1 2281 true +1476221028150 test-first 1 2281 true +1476221028151 test-first 1 2281 true +1476221028152 test-first 1 2281 true +1476221028153 test-first 1 2281 true +1476221028154 test-first 1 2281 true +1476221028155 test-first 1 2281 true +1476221028156 test-first 1 2281 true +1476221028157 test-first 1 2281 true +1476221028158 test-first 1 2281 true +1476221028159 test-first 1 2281 true +1476221028160 test-first 1 2281 true +1476221028161 test-first 1 2281 true +1476221028162 test-first 1 2281 true +1476221028163 test-first 1 2281 true +1476221028164 test-first 1 2281 true +1476221028165 test-first 1 2281 true +1476221028166 test-first 1 2281 true +1476221028167 test-first 1 2281 true +1476221028168 test-first 1 2281 true +1476221028169 test-first 1 2281 true +1476221028170 test-first 1 2281 true +1476221028171 test-first 1 2281 true +1476221028172 test-first 1 2281 true +1476221028173 test-first 1 2281 true +1476221028174 test-first 1 2281 true +1476221028175 test-first 1 2281 true +1476221028176 test-first 1 2281 true +1476221028177 test-first 1 2281 true +1476221028178 test-first 1 2281 true +1476221028179 test-first 1 2281 true +1476221028180 test-first 1 2281 true +1476221028181 test-first 1 2281 true +1476221028182 test-first 1 2281 true +1476221028183 test-first 1 2281 true +1476221028184 test-first 1 2281 true +1476221028185 test-first 1 2281 true +1476221028186 test-first 1 2281 true +1476221028187 test-first 1 2281 true +1476221028188 test-first 1 2281 true +1476221028189 test-first 1 2281 true +1476221028190 test-first 1 2281 true +1476221028191 test-first 1 2281 true +1476221028192 test-first 1 2281 true +1476221028193 test-first 1 2281 true +1476221028194 test-first 1 2281 true +1476221028195 test-first 1 2281 true +1476221028196 test-first 1 2281 true +1476221028197 test-first 1 2281 true +1476221028198 test-first 1 2281 true +1476221028199 test-first 1 2281 true +1476221028200 test-first 1 2281 true +1476221028201 test-first 1 2281 true +1476221028202 test-first 1 2281 true +1476221028203 test-first 1 2281 true +1476221028204 test-first 1 2281 true +1476221028205 test-first 1 2281 true +1476221028206 test-first 1 2281 true +1476221028207 test-first 1 2281 true +1476221028208 test-first 1 2281 true +1476221028209 test-first 1 2281 true +1476221028210 test-first 1 2281 true +1476223499473 refactoring 3 2219 true +1476223499474 refactoring 3 2219 true +1476223499475 refactoring 3 2219 true +1476223499476 refactoring 3 2219 true +1476223499477 refactoring 3 2219 true +1476223499478 refactoring 3 2219 true +1476223499479 refactoring 3 2219 true +1476223499480 refactoring 3 2219 true +1476223499481 refactoring 3 2219 true +1476223499482 refactoring 3 2219 true +1476223499483 refactoring 3 2219 true +1476223499484 refactoring 3 2219 true +1476223499485 refactoring 3 2219 true +1476223499486 refactoring 3 2219 true +1476223499487 refactoring 3 2219 true +1476223499488 refactoring 3 2219 true +1476223499489 refactoring 3 2219 true +1476223499490 refactoring 3 2219 true +1476223499491 refactoring 3 2219 true +1476223499492 refactoring 3 2219 true +1476223499493 refactoring 3 2219 true +1476223499494 refactoring 3 2219 true +1476223499495 refactoring 3 2219 true +1476223499496 refactoring 3 2219 true +1476223499497 refactoring 3 2219 true +1476223499498 refactoring 3 2219 true +1476223499499 refactoring 3 2219 true +1476223499500 refactoring 3 2219 true +1476223499501 refactoring 3 2219 true +1476223499502 refactoring 3 2219 true +1476223499503 refactoring 3 2219 true +1476223499504 refactoring 3 2219 true +1476223499505 refactoring 3 2219 true +1476223499506 refactoring 3 2219 true +1476223499507 refactoring 3 2219 true +1476223499508 refactoring 3 2219 true +1476223499509 refactoring 3 2219 true +1476223499510 refactoring 3 2219 true +1476223499511 refactoring 3 2219 true +1476223499512 refactoring 3 2219 true +1476223499513 refactoring 3 2219 true +1476223499514 refactoring 3 2219 true +1476223499515 refactoring 3 2219 true +1476223499516 refactoring 3 2219 true +1476223499517 refactoring 3 2219 true +1476223499518 refactoring 3 2219 true +1476223499519 refactoring 3 2219 true +1476223499520 refactoring 3 2219 true +1476223499521 refactoring 3 2219 true +1476223499522 refactoring 3 2219 true +1476223499523 refactoring 3 2219 true +1476223499524 refactoring 3 2219 true +1476223499525 refactoring 3 2219 true +1476223499526 refactoring 3 2219 true +1476223499527 refactoring 3 2219 true +1476223499528 refactoring 3 2219 true +1476223499529 refactoring 3 2219 true +1476223499530 refactoring 3 2219 true +1476223499531 refactoring 3 2219 true +1476223499532 refactoring 3 2219 true +1476223499533 refactoring 3 2219 true +1476223499534 refactoring 3 2219 true +1476223499535 refactoring 3 2219 true +1476223499536 refactoring 3 2219 true +1476223499537 refactoring 3 2219 true +1476223499538 refactoring 3 2219 true +1476223499539 refactoring 3 2219 true +1476223499540 refactoring 3 2219 true +1476223700474 production 1 174 false +1476223700475 refactoring 2A 174 true +1476223849423 production 1 36 false +1476223849424 refactoring 2A 36 true +1476224498222 refactoring 2A 404 true +1476225220498 refactoring 2A 573 true +1476225220499 production 1 573 false diff --git a/.besouro/20161011222626759/disagreements.txt b/.besouro/20161011222626759/disagreements.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161011222626759/randomHeuristicEpisodes.txt b/.besouro/20161011222626759/randomHeuristicEpisodes.txt new file mode 100644 index 0000000..b2228d6 --- /dev/null +++ b/.besouro/20161011222626759/randomHeuristicEpisodes.txt @@ -0,0 +1,9 @@ +1476218268243 production 1 4281 false +1476218304475 refactoring 2A 9 true +1476218315352 refactoring 2A 2 false +1476221028091 test-first 1 2281 true +1476223499473 refactoring 3 2219 true +1476223700474 production 1 174 false +1476223849423 production 1 36 false +1476224498222 refactoring 2A 404 true +1476225220498 refactoring 2A 573 false diff --git a/.besouro/20161011222626759/userComments.txt b/.besouro/20161011222626759/userComments.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161011222626759/zorroEpisodes.txt b/.besouro/20161011222626759/zorroEpisodes.txt new file mode 100644 index 0000000..e04d895 --- /dev/null +++ b/.besouro/20161011222626759/zorroEpisodes.txt @@ -0,0 +1,9 @@ +1476218268243 production 1 4281 true +1476218304475 refactoring 2A 36 true +1476218315352 refactoring 2A 10 true +1476221028091 test-first 1 2712 true +1476223499473 refactoring 3 2471 true +1476223700474 production 1 201 true +1476223849423 production 1 148 true +1476224498222 refactoring 2A 648 true +1476225220498 refactoring 2A 722 true diff --git a/src/RomanNumeralException.java b/src/RomanNumeralException.java new file mode 100644 index 0000000..dd84880 --- /dev/null +++ b/src/RomanNumeralException.java @@ -0,0 +1,7 @@ +import java.lang.Exception; + +public class RomanNumeralException extends Exception { + public RomanNumeralException (String msg) { + super(msg); + } +} diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 20904f0..0c3f3a9 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -1,8 +1,151 @@ +import java.util.Hashtable; public class RomanNumerals { - public int convertToInteger(String romanNum) { - // To be Implemented - return 0; + private Hashtable indexTable; + private int[] arabVals = { 1, 5, 10, 50, 100, 500, 1000 }; + + public RomanNumerals() { + indexTable = new Hashtable(); + fillNumTable(); + } + +/* 1 I 10 X 100 C + 2 II 20 XX 200 CC + 3 III 30 XXX 300 CCC + 4 IV 40 XL 400 CD + 5 V 50 L 500 D + 6 VI 60 LX 600 DC + 7 VII 70 LXX 700 DCC + 8 VIII 80 LXXX 800 DCCC + 9 IX 90 XC 900 CM +*/ + private void fillNumTable() { + indexTable.put("I", 0); + indexTable.put("V", 1); + indexTable.put("X", 2); + indexTable.put("L", 3); + indexTable.put("C", 4); + indexTable.put("D", 5); + indexTable.put("M", 6); + } + + public int convertToInteger(String romanNum) throws RomanNumeralException { + Integer ret = null; + + // test subtraction for all chars + + return singleNumToInteger(romanNum); + + //throw new RomanNumeralException("No equivalent found for given Roman number: " + romanNum); + } + + public int singleNumToInteger(String num) throws RomanNumeralException, NullPointerException { + Integer ret = null; + + if (null == num) + throw new RomanNumeralException("Null value can't be converted from Roman numeral to Arabic"); + + if (num.length() > 1) + throw new RomanNumeralException("Only single numbers accepted"); + + ret = arabVals[indexTable.get(num)]; + + if (null == ret) + throw new RomanNumeralException("Arabic conversion for Roman number: " + num + " not found"); + + return ret; + } + + public boolean isSubtraction(String romanNum, int pos) throws RomanNumeralException { + if ((romanNum.length() - 1) < pos) + throw new RomanNumeralException( + "Position to check for subtraction is out of bounds. roman num length was: " + + romanNum.length() + " position was: " + pos); + + // Character at pos is the last character + if ((pos + 2) > romanNum.length()) + return false; + + if (pos - 1 >= 0 && romanNum.substring(pos, pos + 1).equals(romanNum.substring(pos - 1, pos))) + throw new RomanNumeralException("Only one subtraction can be made per numeral"); + + if (isFiveSymbol(romanNum.substring(pos, pos + 1))) + throw new RomanNumeralException("'5' symbols can never be subtracted"); + + if (indexTable.get(romanNum.substring(pos, pos + 1)) - indexTable.get(romanNum.substring(pos + 1, pos + 2)) < -2) + throw new RomanNumeralException("'1' symbols can only be subtracted from 2 next highest values"); + + if (convertToInteger(romanNum.substring(pos, pos + 1)) < convertToInteger(romanNum.substring((pos + 1), (pos + 2)))) + return true; + + return false; + } + + public boolean repeatingOkOneSymbols(String num) throws RomanNumeralException { + int subsequentAmount = 0; + String prev = ""; + + for (int i = 0; i < num.length(); i++) { + if (prev.equals(num.substring(i, i + 1)) && isOneSymbol(num.substring(i, i + 1))) { + subsequentAmount++; + } else { + subsequentAmount = 0; + } + + if (subsequentAmount > 2) + return false; + + prev = num.substring(i, i + 1); + } + + return true; + } + + public boolean isOneSymbol(String sym) throws RomanNumeralException { + String[] oneSymbols = { "I", "X", "C", "M" }; + + if (sym.length() > 1) + throw new RomanNumeralException("Only one character must be checked with isOneSymbol"); + + for (int i = 0; i < oneSymbols.length; i++) { + if (sym.equals(oneSymbols[i])) + return true; + } + + return false; + } + + public boolean isFiveSymbol(String sym) throws RomanNumeralException { + String[] fiveSymbols = { "V", "L", "D" }; + + if (sym.length() > 1) + throw new RomanNumeralException("Only one character must be checked with isFiveSymbol"); + + for (int i = 0; i < fiveSymbols.length; i++) { + if (sym.equals(fiveSymbols[i])) + return true; + } + + return false; + } + + public boolean repeatingOkFiveSymbols(String num) throws RomanNumeralException { + int subsequentAmount = 0; + String prev = ""; + + for (int i = 0; i < num.length(); i++) { + if (prev.equals(num.substring(i, i + 1)) && isFiveSymbol(num.substring(i, i + 1))) { + subsequentAmount++; + } else { + subsequentAmount = 0; + } + + if (subsequentAmount > 0) + return false; + + prev = num.substring(i, i + 1); + } + return true; } } diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 5d1de75..9cd7979 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -1,12 +1,118 @@ import static org.junit.Assert.*; import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +//@RunWith(Parameterized.class) public class TestRomanNumerals { + //private RomanNumerals = new RomanNumerals(); + + /*private String romanTestNum; + + public TestRomanNumerals(String parTestNum) { + romanTestNum = parTestNum; + } + + @Parameters + public static Collection testData() { + return Arrays.asList(new Object [][] { + {"I"}, + {"II"}, + {"CM"}, + }); + }*/ + + @Test + public void number_1_Generated() throws RomanNumeralException { + RomanNumerals numerals = new RomanNumerals(); + assertTrue(1 == numerals.convertToInteger("I")); + } + + @Test + public void subtractionDetected() throws RomanNumeralException { + RomanNumerals romans = new RomanNumerals(); + boolean caseFailed = false; + int i = 0; + + String[] testCases = { + "IV", + "CM", + "II", + }; + + boolean[] correctResults = { + true, + true, + false + }; + + for (i = 0; i < testCases.length; i++) { + if (correctResults[i] != romans.isSubtraction(testCases[i], 0)) { + caseFailed = true; + break; + } + } + + assertTrue("Subtraction not detected. Failed case number: " + i, + false == caseFailed); + } @Test - public void test() { - fail("Not yet implemented"); + public void maxThreeRepeats() throws RomanNumeralException { + RomanNumerals romans = new RomanNumerals(); + boolean caseFailed = false; + int i = 0; + + String[] testCases = { + "VIII", + "MCCCC", + "XXX" + }; + + boolean[] correctResults = { + true, + false, + true + }; + + for (i = 0; i < testCases.length; i++) { + if (correctResults[i] != romans.repeatingOkOneSymbols(testCases[i])) { + caseFailed = true; + break; + } + } + + assertTrue("Repeating of '1' symbols is not ok for test case: " + i, + false == caseFailed); } + + @Test + public void fiveSymbolsNotRepeated() throws RomanNumeralException { + RomanNumerals romans = new RomanNumerals(); + boolean caseFailed = false; + int i = 0; + String[] testCases = { + "DCCLL", + "MDDLX", + "DCDLXIV" + }; + + boolean[] correctResults = { + false, + false, + true + }; + + for (i = 0; i < testCases.length; i++) { + if (correctResults[i] != romans.repeatingOkFiveSymbols(testCases[i])) { + caseFailed = true; + break; + } + } + + assertTrue("Repeating of '5' symbols is not ok for test case: " + i, + false == caseFailed); + } }