==========SNIPPET 1================== /home/miltiadis/Desktop/samples/evalPrjs/junit/src/test/java/org/junit/tests/experimental/theories/extendingwithstubs/MethodCall.java.argList: private List argList(){ ArrayList list=new ArrayList(); for ( Object arg : args) { list.add(new StringableObject(arg)); } return list; } ------------------------------------------- 1.'arg' (8.57%) -> {value(19.85%), parametersOfSingleTest(11.06%), child(9.52%), } B.No. Junk C.No. Might have accepted 'each' ==========SNIPPET 2================== /home/miltiadis/Desktop/samples/evalPrjs/junit/src/test/java/org/junit/tests/experimental/max/MaxStarterTest.java.rememberOldRuns: @Test public void rememberOldRuns(){ fMax.run(TwoUnEqualTests.class); MaxCore reincarnation=MaxCore.storedLocally(fMaxFile); List failures=reincarnation.run(TwoUnEqualTests.class).getFailures(); assertEquals("fast",failures.get(0).getDescription().getMethodName()); assertEquals("slow",failures.get(1).getDescription().getMethodName()); } ------------------------------------------- 1.'reincarnation' (35.48%) -> {fMax(64.52%), } B.No C.No. Suggestion would mask field name ==========SNIPPET 3================== /home/miltiadis/Desktop/samples/evalPrjs/junit/src/main/java/org/junit/runners/Parameterized.java.parametersMethodReturnedWrongType: private Exception parametersMethodReturnedWrongType() throws Exception { String className=getTestClass().getName(); String methodName=getParametersMethod().getName(); String message=MessageFormat.format("{0}.{1}() must return an Iterable of arrays.",className,methodName); return new Exception(message); } ------------------------------------------- 1.'className' (24.62%) -> {clazz(41.52%), result(33.87%), } B.Yes C.No. Really get the sense that types would help here ==========SNIPPET 4================== /home/miltiadis/Desktop/samples/evalPrjs/junit/src/test/java/org/junit/tests/running/methods/TimeoutTest.java.compatibility: @Test public void compatibility(){ TestResult result=new TestResult(); new JUnit4TestAdapter(InfiniteLoopTest.class).run(result); assertEquals(1,result.errorCount()); } ------------------------------------------- 1.'InfiniteLoopTest' (36.48%) -> {IgnoredTest(63.52%), } 2.'errorCount' (21.08%) -> {getFailureCount(31.22%), getRunCount(28.42%), } B.No C.No ==========SNIPPET 5================== /home/miltiadis/Desktop/samples/evalPrjs/junit/src/main/java/org/junit/runners/BlockJUnit4ClassRunner.java.describeChild: @Override protected Description describeChild(FrameworkMethod method){ Description description=fMethodDescriptions.get(method); if (description == null) { description=Description.createTestDescription(getTestClass().getJavaClass(),testName(method),method.getAnnotations()); fMethodDescriptions.putIfAbsent(method,description); } return description; } ------------------------------------------- 1.'getAnnotations' (33.33%) -> {getParameterAnnotations(66.67%), } B.No C.No ==========SNIPPET 6================== /home/miltiadis/Desktop/samples/evalPrjs/junit/src/main/java/junit/framework/TestSuite.java.testCaseForClass: private Test testCaseForClass(Class each){ if (TestCase.class.isAssignableFrom(each)) { return new TestSuite(each.asSubclass(TestCase.class)); } else { return warning(each.getCanonicalName() + " does not extend TestCase"); } } ------------------------------------------- 1.'each' (7.17%) -> {testClass(18.33%), klass(14.61%), returnType(12.89%), type(10.15%), candidate(9.01%), )(7.85%), member(7.54%), } B.Yes C.Yes. interesting that clazz isn't picked up. This is a good example of where there's an opportunity for merging ==========SNIPPET 7================== /home/miltiadis/Desktop/samples/evalPrjs/junit/src/main/java/org/junit/internal/AssumptionViolatedException.java.AssumptionViolatedException: public AssumptionViolatedException(String assumption,Throwable t){ this(assumption,false,t,null); } ------------------------------------------- 1.'assumption' (15.06%) -> {message(32.61%), testClass(21.39%), clazz(15.52%), name(15.42%), } B.Yes C.Yes ==========SNIPPET 8================== /home/miltiadis/Desktop/samples/evalPrjs/junit/src/test/java/org/junit/tests/experimental/theories/runner/UnsuccessfulWithDataPointFields.java.dataPointFieldsMustBePublic: @Test public void dataPointFieldsMustBePublic(){ PrintableResult result=testResult(DataPointFieldsMustBePublic.class); assertEquals(6,result.failureCount()); assertThat(result,allOf(hasFailureContaining("DataPoint field THREE must be public"),hasFailureContaining("DataPoint field THREES must be public"),hasFailureContaining("DataPoint field FOUR must be public"),hasFailureContaining("DataPoint field FOURS must be public"),hasFailureContaining("DataPoint field FIVE must be public"),hasFailureContaining("DataPoint field FIVES must be public"))); } ------------------------------------------- 1.'failureCount' (18.83%) -> {getFailureCount(34.01%), runCount(24.51%), getRunCount(22.65%), } B.Yes C.Yes ==========SNIPPET 9================== /home/miltiadis/Desktop/samples/evalPrjs/junit/src/test/java/junit/tests/framework/TestCaseTest.java.testExceptionRunningAndTearDown: public void testExceptionRunningAndTearDown(){ Test t=new TornDown(){ @Override public void tearDown(){ throw new Error("tearingDown"); } } ; TestResult result=new TestResult(); t.run(result); TestFailure failure=result.errors().nextElement(); assertEquals("running",failure.thrownException().getMessage()); } ------------------------------------------- 1.'t' (12.03%) -> {test(30.41%), wrapper(13.05%), } B.Yes C.Yes ==========SNIPPET 10================== /home/miltiadis/Desktop/samples/evalPrjs/junit/src/main/java/org/junit/internal/builders/AnnotatedBuilder.java.runnerForClass: @Override public Runner runnerForClass(Class testClass) throws Exception { RunWith annotation=testClass.getAnnotation(RunWith.class); if (annotation != null) { return buildRunner(annotation.value(),testClass); } return null; } ------------------------------------------- 1.'testClass' (12.29%) -> {klass(20.65%), description(16.67%), } B.Yes C.Yes ==========SNIPPET 11================== /home/miltiadis/Desktop/samples/evalPrjs/junit/src/main/java/org/junit/runners/BlockJUnit4ClassRunner.java.validateZeroArgConstructor: protected void validateZeroArgConstructor(List errors){ if (!getTestClass().isANonStaticInnerClass() && hasOneConstructor() && (getTestClass().getOnlyConstructor().getParameterTypes().length != 0)) { String gripe="Test class should have exactly one public zero-argument constructor"; errors.add(new Exception(gripe)); } } ------------------------------------------- 1.'gripe' (22.08%) -> {message(45.61%), string(32.31%), } A.Yes C.Yes ==========SNIPPET 12================== /home/miltiadis/Desktop/samples/evalPrjs/junit/src/main/java/org/junit/internal/runners/JUnit4ClassRunner.java.filter: public void filter(Filter filter) throws NoTestsRemainException { for (Iterator iter=fTestMethods.iterator(); iter.hasNext(); ) { Method method=iter.next(); if (!filter.shouldRun(methodDescription(method))) { iter.remove(); } } if (fTestMethods.isEmpty()) { throw new NoTestsRemainException(); } } ------------------------------------------- 1.'method' (18.36%) -> {each(44.19%), test(18.86%), next(18.59%), } A.No: each is a junk variable. C.Yes ==========SNIPPET 13================== /home/miltiadis/Desktop/samples/evalPrjs/junit/src/test/java/org/junit/tests/experimental/rules/EventCollector.java.toString: @Override public String toString(){ StringBuilder sb=new StringBuilder(); sb.append(fTestRunsStarted.size()); sb.append(" test runs started, "); sb.append(fTestRunsFinished.size()); sb.append(" test runs finished, "); sb.append(fTestsStarted.size()); sb.append(" tests started, "); sb.append(fTestsFinished.size()); sb.append(" tests finished, "); sb.append(fFailures.size()); sb.append(" failures, "); sb.append(fAssumptionFailures.size()); sb.append(" assumption failures, "); sb.append(fTestsIgnored.size()); sb.append(" tests ignored"); return sb.toString(); } ------------------------------------------- 1.'sb' (18.45%) -> {builder(42.92%), buffer(38.63%), } A.Yes C.Yes ==========SNIPPET 14================== /home/miltiadis/Desktop/samples/evalPrjs/junit/src/test/java/org/junit/tests/junit3compatibility/OldTestClassAdaptingListenerTest.java.addFailureDelegatesToNotifier: @Test public void addFailureDelegatesToNotifier(){ Result result=new Result(); RunListener listener=result.createListener(); RunNotifier notifier=new RunNotifier(); notifier.addFirstListener(listener); TestCase testCase=new TestCase(){ } ; TestListener adaptingListener=new JUnit38ClassRunner(testCase).createAdaptingListener(notifier); adaptingListener.addFailure(testCase,new AssertionFailedError()); assertEquals(1,result.getFailureCount()); } ------------------------------------------- 1.'testCase' (34.81%) -> {test(65.19%), } A.No: more meaningful name replaced with a junk name, this is potentially inaccurate as both Test and TestCase classes exist. C.No ==========SNIPPET 15================== /home/miltiadis/Desktop/samples/evalPrjs/junit/src/test/java/junit/tests/extensions/RepeatedTestTest.java.testRepeatedOnce: public void testRepeatedOnce(){ Test test=new RepeatedTest(fSuite,1); assertEquals(2,test.countTestCases()); TestResult result=new TestResult(); test.run(result); assertEquals(2,result.runCount()); } ------------------------------------------- 1.'runCount' (24.11%) -> {getRunCount(40.25%), getFailureCount(35.64%), } A.Yes C.Yes ==========SNIPPET 16================== /home/miltiadis/Desktop/samples/evalPrjs/junit/src/test/java/org/junit/tests/experimental/theories/internal/AllMembersSupplierTest.java.dataPointsCollectionShouldBeRecognizedIgnoringStrangeTypes: @Test public void dataPointsCollectionShouldBeRecognizedIgnoringStrangeTypes() throws Throwable { List assignments=potentialAssignments(HasDataPointsListFieldWithOverlyGenericTypes.class.getMethod("theory",String.class)); assertEquals(1,assignments.size()); } ------------------------------------------- 1.'HasDataPointsListFieldWithOverlyGenericTypes' (22.31%) -> {HasSpecificDatapointsParameters(38.84%), TestClassUsingParameterSupplier(38.84%), } A.No C.No ==========SNIPPET 17================== /home/miltiadis/Desktop/samples/evalPrjs/junit/src/test/java/org/junit/runner/notification/ConcurrentRunNotifierTest.java.reportConcurrentFailuresAfterAddFirstListener: @Test public void reportConcurrentFailuresAfterAddFirstListener() throws Exception { new AbstractConcurrentFailuresTest(){ @Override protected void addListener( ExaminedListener listener){ fNotifier.addFirstListener(listener); } } .test(); } ------------------------------------------- 1.'test' (35.81%) -> {run(64.19%), } A.No C.Yes ==========SNIPPET 18================== /home/miltiadis/Desktop/samples/evalPrjs/junit/src/test/java/org/junit/tests/experimental/theories/runner/UnsuccessfulWithDataPointFields.java.dataPointMethodsMustBePublic: @Test public void dataPointMethodsMustBePublic(){ PrintableResult result=testResult(DataPointMethodsMustBePublic.class); assertEquals(6,result.failureCount()); assertThat(result,allOf(hasFailureContaining("DataPoint method three must be public"),hasFailureContaining("DataPoint method threes must be public"),hasFailureContaining("DataPoint method four must be public"),hasFailureContaining("DataPoint method fours must be public"),hasFailureContaining("DataPoint method five must be public"),hasFailureContaining("DataPoint method fives must be public"))); } ------------------------------------------- 1.'failureCount' (18.83%) -> {getFailureCount(34.01%), runCount(24.51%), getRunCount(22.65%), } A.Yes C.Yes ==========SNIPPET 19================== /home/miltiadis/Desktop/samples/evalPrjs/junit/src/test/java/org/junit/tests/experimental/theories/internal/AllMembersSupplierTest.java.allMemberValuesFor: private List allMemberValuesFor(Class testClass,Class... constructorParameterTypes) throws Throwable { return new AllMembersSupplier(new TestClass(testClass)).getValueSources(ParameterSignature.signatures(testClass.getConstructor(constructorParameterTypes)).get(0)); } ------------------------------------------- 1.'constructorParameterTypes' (7.24%) -> {categories(17.92%), params(17.77%), classes(12.54%), args(11.43%), errors(9.18%), t(9.09%), failure(7.50%), testClass(7.31%), } A.No: all the names are junk names C.Yes ==========SNIPPET 20================== /home/miltiadis/Desktop/samples/evalPrjs/elasticsearch/src/main/java/org/elasticsearch/common/regex/Regex.java.isSimpleMatchPattern: public static boolean isSimpleMatchPattern(String str){ return str.indexOf('*') != -1; } ------------------------------------------- 1.'str' (13.25%) -> {blobName(29.44%), key(25.90%), name(16.68%), source(14.73%), } A.No C.No ==========SNIPPET 21================== /home/miltiadis/Desktop/samples/evalPrjs/elasticsearch/src/main/java/org/elasticsearch/transport/EmptyTransportResponseHandler.java.EmptyTransportResponseHandler: public EmptyTransportResponseHandler(String executor){ this.executor=executor; } ------------------------------------------- 1.'executor' (.18%) -> {name(.45%), id(.39%), index(.38%), field(.36%), type(.35%), value(.35%), analyzer(.35%), routing(.34%), sortMode(.34%), text(.33%), } A.No B.No ==========SNIPPET 22================== /home/miltiadis/Desktop/samples/evalPrjs/elasticsearch/src/test/java/org/elasticsearch/test/unit/common/lucene/search/XBooleanFilterTests.java.testOnlyShouldClauses: @Test public void testOnlyShouldClauses() throws Exception { List booleanFilters=new ArrayList(); booleanFilters.add(createBooleanFilter(newFilterClause(1,'a',SHOULD,true),newFilterClause(1,'b',SHOULD,true))); booleanFilters.add(createBooleanFilter(newFilterClause(1,'a',SHOULD,false),newFilterClause(1,'b',SHOULD,false))); booleanFilters.add(createBooleanFilter(newFilterClause(1,'a',SHOULD,true),newFilterClause(1,'b',SHOULD,false))); for ( XBooleanFilter booleanFilter : booleanFilters) { FixedBitSet result=new FixedBitSet(reader.maxDoc()); result.or(booleanFilter.getDocIdSet(reader.getContext(),reader.getLiveDocs()).iterator()); assertThat(result.cardinality(),equalTo(3)); assertThat(result.get(0),equalTo(true)); assertThat(result.get(1),equalTo(true)); assertThat(result.get(2),equalTo(true)); } } ------------------------------------------- 1.'result' (9.60%) -> {res(15.35%), bits(11.66%), segments(10.68%), results(9.97%), doc(9.77%), } 2.'booleanFilters' (10.95%) -> {indexReferences(17.18%), fields(12.87%), ids(12.36%), modules(12.14%), d(11.76%), shardReferences(11.40%), stats(11.33%), } A.Yes: The fact that result has a number of near synonyms, like res and results, is evidence of needless diversity. B.Yes ==========SNIPPET 23================== /home/miltiadis/Desktop/samples/evalPrjs/elasticsearch/src/test/java/org/elasticsearch/test/integration/TestCluster.java.ensureAtLeastNumNodes: public void ensureAtLeastNumNodes(Settings settings,int num){ int size=nodes.size(); for (int i=size; i < num; i++) { buildNode(settings).start(); } } ------------------------------------------- 1.'num' (2.69%) -> {size(4.06%), length(3.72%), len(3.35%), } 2.'size' (16.46%) -> {delta(23.93%), localNodeId(21.69%), } A.No: And this is a problem. 'num' shouldn't be included. B.No ==========SNIPPET 24================== /home/miltiadis/Desktop/samples/evalPrjs/elasticsearch/src/test/java/org/elasticsearch/test/unit/common/lucene/search/XBooleanFilterTests.java.testWithTwoClausesOfEachOccur_allFilterTypes: @Test public void testWithTwoClausesOfEachOccur_allFilterTypes() throws Exception { List booleanFilters=new ArrayList(); booleanFilters.add(createBooleanFilter(newFilterClause(0,'a',MUST,true),newFilterClause(1,'b',MUST,false),newFilterClause(2,'c',SHOULD,true),newFilterClause(3,'d',SHOULD,false),newFilterClause(4,'e',MUST_NOT,true),newFilterClause(5,'f',MUST_NOT,false))); booleanFilters.add(createBooleanFilter(newFilterClause(4,'e',MUST_NOT,true),newFilterClause(5,'f',MUST_NOT,false),newFilterClause(0,'a',MUST,true),newFilterClause(1,'b',MUST,false),newFilterClause(2,'c',SHOULD,true),newFilterClause(3,'d',SHOULD,false))); booleanFilters.add(createBooleanFilter(newFilterClause(2,'c',SHOULD,true),newFilterClause(3,'d',SHOULD,false),newFilterClause(4,'e',MUST_NOT,true),newFilterClause(5,'f',MUST_NOT,false),newFilterClause(0,'a',MUST,true),newFilterClause(1,'b',MUST,false))); for ( XBooleanFilter booleanFilter : booleanFilters) { FixedBitSet result=new FixedBitSet(reader.maxDoc()); result.or(booleanFilter.getDocIdSet(reader.getContext(),reader.getLiveDocs()).iterator()); assertThat(result.cardinality(),equalTo(2)); assertThat(result.get(0),equalTo(true)); assertThat(result.get(1),equalTo(true)); assertThat(result.get(2),equalTo(false)); } booleanFilters.clear(); booleanFilters.add(createBooleanFilter(newFilterClause(0,'a',MUST,false),newFilterClause(1,'b',MUST,true),newFilterClause(2,'c',SHOULD,false),newFilterClause(3,'d',SHOULD,true),newFilterClause(4,'e',MUST_NOT,false),newFilterClause(5,'f',MUST_NOT,true))); booleanFilters.add(createBooleanFilter(newFilterClause(4,'e',MUST_NOT,false),newFilterClause(5,'f',MUST_NOT,true),newFilterClause(0,'a',MUST,false),newFilterClause(1,'b',MUST,true),newFilterClause(2,'c',SHOULD,false),newFilterClause(3,'d',SHOULD,true))); booleanFilters.add(createBooleanFilter(newFilterClause(2,'c',SHOULD,false),newFilterClause(3,'d',SHOULD,true),newFilterClause(4,'e',MUST_NOT,false),newFilterClause(5,'f',MUST_NOT,true),newFilterClause(0,'a',MUST,false),newFilterClause(1,'b',MUST,true))); for ( XBooleanFilter booleanFilter : booleanFilters) { FixedBitSet result=new FixedBitSet(reader.maxDoc()); result.or(booleanFilter.getDocIdSet(reader.getContext(),reader.getLiveDocs()).iterator()); assertThat(result.cardinality(),equalTo(2)); assertThat(result.get(0),equalTo(true)); assertThat(result.get(1),equalTo(true)); assertThat(result.get(2),equalTo(false)); } } ------------------------------------------- 1.'result' (9.60%) -> {res(15.35%), bits(11.66%), segments(10.68%), results(9.97%), doc(9.77%), } A.Yes, for the same reason as above. B.Yes ==========SNIPPET 25================== /home/miltiadis/Desktop/samples/evalPrjs/elasticsearch/src/test/java/org/elasticsearch/test/integration/search/customscore/CustomScoreSearchTests.java.testScoreExplainBug_2283_withFunctionScore: @Test public void testScoreExplainBug_2283_withFunctionScore() throws Exception { client().admin().indices().prepareDelete().execute().actionGet(); client().admin().indices().prepareCreate("test").setSettings(settingsBuilder().put("index.number_of_shards",1)).execute().actionGet(); ClusterHealthResponse healthResponse=client().admin().cluster().prepareHealth("test").setWaitForYellowStatus().execute().actionGet(); assertThat(healthResponse.isTimedOut(),equalTo(false)); client().prepareIndex("test","type","1").setSource("field","value1","color","red").execute().actionGet(); client().prepareIndex("test","type","2").setSource("field","value2","color","blue").execute().actionGet(); client().prepareIndex("test","type","3").setSource("field","value3","color","red").execute().actionGet(); client().prepareIndex("test","type","4").setSource("field","value4","color","blue").execute().actionGet(); client().admin().indices().prepareRefresh().execute().actionGet(); SearchResponse searchResponse=client().prepareSearch("test").setQuery(functionScoreQuery(matchAllQuery()).scoreMode("first").add(termFilter("field","value4"),new ScriptScoreFunctionBuilder().script("2")).add(termFilter("field","value2"),new ScriptScoreFunctionBuilder().script("3"))).setExplain(true).execute().actionGet(); assertThat(Arrays.toString(searchResponse.getShardFailures()),searchResponse.getFailedShards(),equalTo(0)); assertThat(searchResponse.getHits().totalHits(),equalTo(4l)); assertThat(searchResponse.getHits().getAt(0).id(),equalTo("2")); assertThat(searchResponse.getHits().getAt(0).score(),equalTo(3.0f)); logger.info("--> Hit[0] {} Explanation:\n {}",searchResponse.getHits().getAt(0).id(),searchResponse.getHits().getAt(0).explanation()); Explanation explanation=searchResponse.getHits().getAt(0).explanation(); assertNotNull(explanation); assertThat(explanation.isMatch(),equalTo(true)); assertThat(explanation.getValue(),equalTo(3f)); assertThat(explanation.getDescription(),equalTo("custom score, score mode [first]")); assertThat(explanation.getDetails().length,equalTo(2)); assertThat(explanation.getDetails()[0].isMatch(),equalTo(true)); assertThat(explanation.getDetails()[0].getValue(),equalTo(1f)); assertThat(explanation.getDetails()[0].getDetails().length,equalTo(2)); assertThat(explanation.getDetails()[1].isMatch(),equalTo(true)); assertThat(explanation.getDetails()[1].getValue(),equalTo(3f)); assertThat(explanation.getDetails()[1].getDetails().length,equalTo(3)); searchResponse=client().prepareSearch("test").setQuery(functionScoreQuery(matchAllQuery()).scoreMode("first").add(termFilter("field","value4"),new ScriptScoreFunctionBuilder().script("2")).add(termFilter("field","value2"),new ScriptScoreFunctionBuilder().script("3")).boost(2)).setExplain(true).execute().actionGet(); assertThat(Arrays.toString(searchResponse.getShardFailures()),searchResponse.getFailedShards(),equalTo(0)); assertThat(searchResponse.getHits().totalHits(),equalTo(4l)); assertThat(searchResponse.getHits().getAt(0).id(),equalTo("2")); assertThat(searchResponse.getHits().getAt(0).score(),equalTo(6f)); logger.info("--> Hit[0] {} Explanation:\n {}",searchResponse.getHits().getAt(0).id(),searchResponse.getHits().getAt(0).explanation()); explanation=searchResponse.getHits().getAt(0).explanation(); assertNotNull(explanation); assertThat(explanation.isMatch(),equalTo(true)); assertThat(explanation.getValue(),equalTo(6f)); assertThat(explanation.getDescription(),equalTo("custom score, score mode [first]")); assertThat(explanation.getDetails().length,equalTo(2)); assertThat(explanation.getDetails()[0].isMatch(),equalTo(true)); assertThat(explanation.getDetails()[0].getValue(),equalTo(1f)); assertThat(explanation.getDetails()[0].getDetails().length,equalTo(2)); assertThat(explanation.getDetails()[1].isMatch(),equalTo(true)); assertThat(explanation.getDetails()[1].getValue(),equalTo(6f)); assertThat(explanation.getDetails()[1].getDetails().length,equalTo(3)); assertThat(explanation.getDetails()[1].getDetails()[2].getDescription(),equalTo("queryBoost")); assertThat(explanation.getDetails()[1].getDetails()[2].getValue(),equalTo(2f)); } ------------------------------------------- 1.'healthResponse' (13.73%) -> {clusterHealth(19.80%), clusterHealthResponse(14.21%), } A.Yes, but not sure we should be making a suggestion here. B.Yes ==========SNIPPET 26================== /home/miltiadis/Desktop/samples/evalPrjs/elasticsearch/src/test/java/org/elasticsearch/test/integration/TestCluster.java.buildNode: public Node buildNode(Settings settings){ ensureOpen(); String name=UUID.randomUUID().toString(); String settingsSource=getClass().getName().replace('.','/') + ".yml"; Settings finalSettings=settingsBuilder().loadFromClasspath(settingsSource).put(defaultSettings).put(settings).put("name",name).build(); Node node=nodeBuilder().settings(finalSettings).build(); nodes.put(name,new NodeAndClient(name,node,clientFactory)); return node; } ------------------------------------------- 1.'name' (30.78%) -> {id(69.22%), } A.Yes B.Yes ==========SNIPPET 27================== /home/miltiadis/Desktop/samples/evalPrjs/elasticsearch/src/main/java/org/elasticsearch/indices/analysis/HunspellService.java.getDictionary: public HunspellDictionary getDictionary(String locale){ return dictionaries.getUnchecked(locale); } ------------------------------------------- 1.'locale' (5.01%) -> {name(11.48%), type(9.97%), value(9.07%), key(8.48%), timeout(8.18%), id(7.92%), message(6.57%), settings(6.01%), index(5.95%), node(5.56%), } A.No; while not junk, this is heat-death-y B.No ==========SNIPPET 28================== /home/miltiadis/Desktop/samples/evalPrjs/elasticsearch/src/main/java/org/elasticsearch/common/io/stream/AdapterStreamOutput.java.writeDouble: @Override public void writeDouble(double v) throws IOException { out.writeDouble(v); } ------------------------------------------- 1.'v' (7.70%) -> {value(18.09%), } A.Yes B.Yes ==========SNIPPET 29================== /home/miltiadis/Desktop/samples/evalPrjs/elasticsearch/src/main/java/org/elasticsearch/common/inject/MembersInjectorStore.java.createWithListeners: private MembersInjectorImpl createWithListeners(TypeLiteral type,Errors errors) throws ErrorsException { int numErrorsBefore=errors.size(); Set injectionPoints; try { injectionPoints=InjectionPoint.forInstanceMethodsAndFields(type); } catch ( ConfigurationException e) { errors.merge(e.getErrorMessages()); injectionPoints=e.getPartialValue(); } ImmutableList injectors=getInjectors(injectionPoints,errors); errors.throwIfNewErrors(numErrorsBefore); EncounterImpl encounter=new EncounterImpl(errors,injector.lookups); for ( TypeListenerBinding typeListener : typeListenerBindings) { if (typeListener.getTypeMatcher().matches(type)) { try { typeListener.getListener().hear(type,encounter); } catch ( RuntimeException e) { errors.errorNotifyingTypeListener(typeListener,type,e); } } } encounter.invalidate(); errors.throwIfNewErrors(numErrorsBefore); return new MembersInjectorImpl(injector,type,encounter,injectors); } ------------------------------------------- 1.'getErrorMessages' (21.90%) -> {getErrors(37.27%), } A.Yes: it's reasonable b/c elastic search's Message class contains a Throwable cause field and is thus itself misnamed and is really more an error than a mere error message. B.Yes ==========SNIPPET 30================== /home/miltiadis/Desktop/samples/evalPrjs/elasticsearch/src/main/java/org/elasticsearch/index/translog/fs/FsChannelSnapshot.java.hasNext: @Override public boolean hasNext(){ try { if (position > length) { return false; } if (cacheBuffer == null) { cacheBuffer=ByteBuffer.allocate(1024); } cacheBuffer.limit(4); int bytesRead=channel.read(cacheBuffer,position); if (bytesRead < 4) { return false; } cacheBuffer.flip(); int opSize=cacheBuffer.getInt(); position+=4; if ((position + opSize) > length) { position-=4; return false; } if (cacheBuffer.capacity() < opSize) { cacheBuffer=ByteBuffer.allocate(opSize); } cacheBuffer.clear(); cacheBuffer.limit(opSize); channel.read(cacheBuffer,position); cacheBuffer.flip(); position+=opSize; lastOperationRead=TranslogStreams.readTranslogOperation(new BytesStreamInput(cacheBuffer.array(),0,opSize,true)); return true; } catch ( Exception e) { return false; } } ------------------------------------------- 1.'bytesRead' (11.81%) -> {read(27.03%), len(24.80%), bit(23.15%), i(13.20%), } A.No B.No