Program: 137320
Project: 137320
Buggy source:
/** 
 * Test method for  {@link org.talend.cwm.dependencies.DependenciesHandler#getClintDependency(org.talend.core.model.properties.Property)}.
 */
@Test public void testGetClintDependencyProperty(){
  Property countIndicatorProperty=org.talend.core.model.properties.PropertiesFactory.eINSTANCE.createProperty();
  TDQIndicatorDefinitionItem countIndicatorItem=PropertiesFactory.eINSTANCE.createTDQIndicatorDefinitionItem();
  countIndicatorProperty.setItem(countIndicatorItem);
  countIndicatorItem.setProperty(countIndicatorProperty);
  Property anaProperty=org.talend.core.model.properties.PropertiesFactory.eINSTANCE.createProperty();
  TDQAnalysisItem createItem=PropertiesFactory.eINSTANCE.createTDQAnalysisItem();
  Analysis createAnalysis=AnalysisFactory.eINSTANCE.createAnalysis();
  AnalysisResult createAnalysisResult=AnalysisFactory.eINSTANCE.createAnalysisResult();
  CountsIndicator createCountsIndicator=IndicatorsFactory.eINSTANCE.createCountsIndicator();
  BlankCountIndicator createBlankCountIndicator=IndicatorsFactory.eINSTANCE.createBlankCountIndicator();
  IndicatorDefinition createIndicatorDefinition=DefinitionFactory.eINSTANCE.createIndicatorDefinition();
  createCountsIndicator.setIndicatorDefinition(createIndicatorDefinition);
  countIndicatorItem.setIndicatorDefinition(createIndicatorDefinition);
  createBlankCountIndicator.setIndicatorDefinition(createIndicatorDefinition);
  createCountsIndicator.getAllChildIndicators().add(createBlankCountIndicator);
  createAnalysisResult.getIndicators().add(createCountsIndicator);
  CompositeIndicator createCompositeIndicator=IndicatorsFactory.eINSTANCE.createTextIndicator();
  createAnalysisResult.getIndicators().add(createCompositeIndicator);
  createIndicatorDefinition=DefinitionFactory.eINSTANCE.createIndicatorDefinition();
  createCompositeIndicator.setIndicatorDefinition(createIndicatorDefinition);
  createAnalysis.setResults(createAnalysisResult);
  createItem.setAnalysis(createAnalysis);
  anaProperty.setItem(createItem);
  createItem.setProperty(anaProperty);
  PowerMockito.mockStatic(PropertyHelper.class);
  Mockito.when(PropertyHelper.getModelElement(anaProperty)).thenReturn(createAnalysis);
  Mockito.when(PropertyHelper.getProperty(createCountsIndicator.getIndicatorDefinition())).thenReturn(countIndicatorProperty);
  PowerMockito.mockStatic(ModelElementHelper.class);
  ModelElementMatcher modelElementMatcher=new ModelElementMatcher();
  Mockito.when(ModelElementHelper.compareUUID(Mockito.argThat(modelElementMatcher),Mockito.argThat(modelElementMatcher))).thenReturn(modelElementMatcher.equals(modelElementMatcher));
  List<Property> clintDependency=DependenciesHandler.getInstance().getClintDependency(anaProperty);
  assertTrue(clintDependency.size() == 1);
  assertTrue(clintDependency.get(0).equals(countIndicatorProperty));
}

Fixed version (ground truth):
/** 
 * Test method for  {@link org.talend.cwm.dependencies.DependenciesHandler#getClintDependency(org.talend.core.model.properties.Property)}.
 */
@Test public void testGetClintDependencyProperty(){
  Property countIndicatorProperty=org.talend.core.model.properties.PropertiesFactory.eINSTANCE.createProperty();
  TDQIndicatorDefinitionItem countIndicatorItem=PropertiesFactory.eINSTANCE.createTDQIndicatorDefinitionItem();
  countIndicatorProperty.setItem(countIndicatorItem);
  countIndicatorItem.setProperty(countIndicatorProperty);
  Property anaProperty=org.talend.core.model.properties.PropertiesFactory.eINSTANCE.createProperty();
  TDQAnalysisItem createItem=PropertiesFactory.eINSTANCE.createTDQAnalysisItem();
  Analysis createAnalysis=AnalysisFactory.eINSTANCE.createAnalysis();
  AnalysisResult createAnalysisResult=AnalysisFactory.eINSTANCE.createAnalysisResult();
  CountsIndicator createCountsIndicator=IndicatorsFactory.eINSTANCE.createCountsIndicator();
  BlankCountIndicator createBlankCountIndicator=IndicatorsFactory.eINSTANCE.createBlankCountIndicator();
  IndicatorDefinition createIndicatorDefinition=DefinitionFactory.eINSTANCE.createIndicatorDefinition();
  createCountsIndicator.setIndicatorDefinition(createIndicatorDefinition);
  countIndicatorItem.setIndicatorDefinition(createIndicatorDefinition);
  createBlankCountIndicator.setIndicatorDefinition(createIndicatorDefinition);
  createCountsIndicator.getAllChildIndicators().add(createBlankCountIndicator);
  createAnalysisResult.getIndicators().add(createCountsIndicator);
  CompositeIndicator createCompositeIndicator=IndicatorsFactory.eINSTANCE.createTextIndicator();
  createAnalysisResult.getIndicators().add(createCompositeIndicator);
  createIndicatorDefinition=DefinitionFactory.eINSTANCE.createIndicatorDefinition();
  createCompositeIndicator.setIndicatorDefinition(createIndicatorDefinition);
  createAnalysis.setResults(createAnalysisResult);
  createItem.setAnalysis(createAnalysis);
  anaProperty.setItem(createItem);
  createItem.setProperty(anaProperty);
  PowerMockito.mockStatic(PropertyHelper.class);
  Mockito.when(PropertyHelper.getModelElement(anaProperty)).thenReturn(createAnalysis);
  Mockito.when(PropertyHelper.getProperty(createCountsIndicator.getIndicatorDefinition())).thenReturn(countIndicatorProperty);
  Mockito.when(PropertyHelper.getProperty(createAnalysis)).thenReturn(anaProperty);
  PowerMockito.mockStatic(ModelElementHelper.class);
  ModelElementMatcher modelElementMatcher=new ModelElementMatcher();
  Mockito.when(ModelElementHelper.compareUUID(Mockito.argThat(modelElementMatcher),Mockito.argThat(modelElementMatcher))).thenReturn(modelElementMatcher.equals(modelElementMatcher));
  List<Property> clintDependency=DependenciesHandler.getInstance().getClintDependencyForExport(createAnalysis);
  Assert.assertEquals(1,clintDependency.size());
  Assert.assertEquals(countIndicatorProperty,clintDependency.get(0));
}