nus-yam/ex-repair huggingface dataset:
Program: 18159
Project: 18159
Buggy source:
@Override public void addToOptions(FacesContext facesContext,UIComponent component,Map<String,Object> options,Object additional){
  AbstractSelect abstractSelect=(AbstractSelect)component;
  SelectHelper.addSelectCssToOptions(abstractSelect,options,new String[]{ITEM_CSS,SELECT_ITEM_CSS,LIST_CSS});
  boolean openOnEdit=(Boolean)component.getAttributes().get("String_Node_Str");
  if (openOnEdit) {
    options.put(OPTIONS_VISIBLE,openOnEdit);
  }
  options.put(SelectHelper.OPTIONS_LIST_ITEMS,additional);
}

Fixed version (ground truth):
@Override public void addToOptions(FacesContext facesContext,UIComponent component,Map<String,Object> options,Object additional){
  AbstractSelect abstractSelect=(AbstractSelect)component;
  SelectHelper.addSelectCssToOptions(abstractSelect,options,new String[]{ITEM_CSS,SELECT_ITEM_CSS,LIST_CSS});
  boolean openOnEdit=(Boolean)component.getAttributes().get("String_Node_Str");
  boolean saveOnSelect=(Boolean)component.getAttributes().get("String_Node_Str");
  if (openOnEdit) {
    options.put(OPTIONS_OPEN_ON_EDIT,openOnEdit);
    options.put(OPTIONS_SAVE_ON_SELECT,saveOnSelect);
  }
  options.put(SelectHelper.OPTIONS_LIST_ITEMS,additional);
}
Program: 18160
Project: 18160
Buggy source:
public String getValue(FacesContext facesContext,UIComponent component) throws IOException {
  AbstractInplaceInput inplaceInput=(AbstractInplaceInput)component;
  String value=getInputValue(facesContext,inplaceInput);
  if (value == null || "String_Node_Str".equals(value)) {
    value=inplaceInput.getDefaultLabel();
  }
  return value;
}

Fixed version (ground truth):
public String getValue(FacesContext facesContext,UIComponent component) throws IOException {
  String value=getInputValue(facesContext,component);
  if (value == null || "String_Node_Str".equals(value)) {
    value=((InplaceComponent)component).getDefaultLabel();
  }
  return value;
}
Program: 18161
Project: 18161
Buggy source:
public String getReadyStyleClass(UIComponent component,InplaceState inplaceState){
  return (InplaceState.changed != inplaceState) ? READY_STATE_CSS : HtmlUtil.concatClasses(READY_STATE_CSS,CHANGED_STATE_CSS);
}

Fixed version (ground truth):
public String getReadyStyleClass(UIComponent component,InplaceState inplaceState){
  return (InplaceState.changed != inplaceState) ? getReadyStateCss() : HtmlUtil.concatClasses(getReadyStateCss(),getChangedStateCss());
}
Program: 18162
Project: 18162
Buggy source:
public InplaceState getInplaceState(UIComponent component){
  return ((AbstractInplaceInput)component).getState();
}

Fixed version (ground truth):
public InplaceState getInplaceState(UIComponent component){
  return ((InplaceComponent)component).getState();
}
Program: 18163
Project: 18163
Buggy source:
public String getEditStyleClass(UIComponent component,InplaceState inplaceState){
  return (InplaceState.edit != inplaceState) ? HtmlUtil.concatClasses(EDIT_STATE_CSS,NONE_CSS) : EDIT_STATE_CSS;
}

Fixed version (ground truth):
public String getEditStyleClass(UIComponent component,InplaceState inplaceState){
  return (InplaceState.edit != inplaceState) ? HtmlUtil.concatClasses(getEditStateCss(),getNoneCss()) : getEditStateCss();
}
Program: 18164
Project: 18164
Buggy source:
public void buildScript(ResponseWriter writer,FacesContext facesContext,UIComponent component) throws IOException {
  AbstractInplaceInput inplaceInput=(AbstractInplaceInput)component;
  JSFunction function=new JSFunction("String_Node_Str");
  function.addParameter(inplaceInput.getClientId(facesContext));
  String clientId=inplaceInput.getClientId(facesContext);
  Map<String,Object> options=new HashMap<String,Object>();
  options.put(OPTIONS_EDIT_EVENT,inplaceInput.getEditEvent());
  options.put(OPTIONS_NONE_CSS,NONE_CSS);
  options.put(OPTIONS_CHANGED_CSS,CHANGED_STATE_CSS);
  options.put(OPTIONS_EDIT_CONTAINER,clientId + "String_Node_Str");
  options.put(OPTIONS_INPUT,clientId + "String_Node_Str");
  options.put(OPTIONS_LABEL,clientId + "String_Node_Str");
  options.put(OPTIONS_FOCUS,clientId + "String_Node_Str");
  options.put(OPTIONS_DEFAULT_LABEL,inplaceInput.getDefaultLabel());
  boolean showControls=inplaceInput.isShowControls();
  options.put(OPTIONS_SHOWCONTROLS,showControls);
  if (showControls) {
    options.put(OPTIONS_BUTTON_OK,clientId + "String_Node_Str");
    options.put(OPTIONS_BUTTON_CANCEL,clientId + "String_Node_Str");
  }
  function.addParameter(options);
  writer.write(function.toString());
}

Fixed version (ground truth):
public void buildScript(ResponseWriter writer,FacesContext facesContext,UIComponent component,Object additional) throws IOException {
  if (!(component instanceof InplaceComponent)) {
    return;
  }
  String scriptName=getScriptName();
  JSFunction function=new JSFunction(scriptName);
  String clientId=component.getClientId(facesContext);
  Map<String,Object> options=createInplaceComponentOptions(clientId,(InplaceComponent)component);
  addToOptions(facesContext,component,options,additional);
  function.addParameter(clientId);
  function.addParameter(options);
  writer.write(function.toString());
}
Program: 18165
Project: 18165
Buggy source:
protected String getMarkupBody(FacesContext context,UIComponent component,boolean children) throws IOException {
  ResponseWriter writer=context.getResponseWriter();
  StringWriter dumpingWriter=new StringWriter();
  ResponseWriter clonedWriter=writer.cloneWithWriter(dumpingWriter);
  context.setResponseWriter(clonedWriter);
  try {
    if (children) {
      this.renderChildren(context,component);
    }
  }
  finally {
    clonedWriter.flush();
    context.setResponseWriter(writer);
  }
  return dumpingWriter.toString();
}

Fixed version (ground truth):
protected String getMarkupBody(FacesContext context,UIComponent component,boolean children) throws IOException {
  ResponseWriter writer=context.getResponseWriter();
  StringWriter dumpingWriter=new StringWriter();
  ResponseWriter clonedWriter=writer.cloneWithWriter(dumpingWriter);
  context.setResponseWriter(clonedWriter);
  try {
    if (children) {
      this.renderChildren(context,component);
    }
 else     if (component.getAttributes().get("String_Node_Str") != null) {
      clonedWriter.write(component.getAttributes().get("String_Node_Str").toString());
    }
  }
  finally {
    clonedWriter.flush();
    context.setResponseWriter(writer);
  }
  return dumpingWriter.toString();
}
Program: 18167
Project: 18167
Buggy source:
protected void encodeItemsContainer(FacesContext facesContext,UIComponent component) throws IOException {
  AutocompleteEncodeStrategy strategy=getStrategy(component);
  Object mode=component.getAttributes().get("String_Node_Str");
  if (mode != null && mode.equals("String_Node_Str")) {
    List<Object> fetchValues=new ArrayList<Object>();
    this.encodeItems(facesContext,component,fetchValues);
  }
 else   if (mode != null && mode.equals("String_Node_Str")) {
    strategy.encodeItemsContainerBegin(facesContext,component);
    strategy.encodeItemsContainerEnd(facesContext,component);
  }
 else {
    strategy.encodeItemsContainerBegin(facesContext,component);
    strategy.encodeFakeItem(facesContext,component);
    strategy.encodeItemsContainerEnd(facesContext,component);
  }
}

Fixed version (ground truth):
protected void encodeItemsContainer(FacesContext facesContext,UIComponent component) throws IOException {
  AutocompleteEncodeStrategy strategy=getStrategy(component);
  Object mode=component.getAttributes().get("String_Node_Str");
  if (mode != null && mode.equals("String_Node_Str")) {
    List<Object> fetchValues=new ArrayList<Object>();
    this.encodeItems(facesContext,component,fetchValues);
  }
 else {
    strategy.encodeItemsContainerBegin(facesContext,component);
    strategy.encodeItemsContainerEnd(facesContext,component);
  }
}
Program: 18168
Project: 18168
Buggy source:
public void encodeItem(FacesContext facesContext,AbstractAutocomplete comboBox,Object item,AutocompleteEncodeStrategy strategy) throws IOException {
  strategy.encodeItemBegin(facesContext,comboBox);
  ResponseWriter writer=facesContext.getResponseWriter();
  writer.writeAttribute(HTML.CLASS_ATTRIBUTE,"String_Node_Str",null);
  if (comboBox.getChildCount() > 0) {
    for (    UIComponent child : comboBox.getChildren()) {
      child.encodeAll(facesContext);
    }
  }
 else {
    if (item != null) {
      String value=null;
      if (comboBox.getItemConverter() != null) {
        value=comboBox.getItemConverter().getAsString(facesContext,comboBox,item);
      }
      if (value != null) {
        writer.writeText(value,null);
      }
      writer.writeText(item,null);
    }
  }
}

Fixed version (ground truth):
public void encodeItem(FacesContext facesContext,AbstractAutocomplete comboBox,Object item,AutocompleteEncodeStrategy strategy) throws IOException {
  strategy.encodeItemBegin(facesContext,comboBox);
  ResponseWriter writer=facesContext.getResponseWriter();
  writer.writeAttribute(HTML.CLASS_ATTRIBUTE,"String_Node_Str",null);
  if (comboBox.getChildCount() > 0) {
    for (    UIComponent child : comboBox.getChildren()) {
      child.encodeAll(facesContext);
    }
  }
 else {
    if (item != null) {
      String value=null;
      if (comboBox.getItemConverter() != null) {
        value=comboBox.getItemConverter().getAsString(facesContext,comboBox,item);
      }
      if (value != null) {
        writer.writeText(value,null);
      }
      writer.writeText(item,null);
    }
  }
  strategy.encodeItemEnd(facesContext,comboBox);
}
Program: 18169
Project: 18169
Buggy source:
public AbstractTogglePanelItem getItem(String name){
  if ("String_Node_Str".equals(name)) {
    return getFirstItem();
  }
 else   if ("String_Node_Str".equals(name)) {
    return getPrevItem();
  }
 else   if ("String_Node_Str".equals(name)) {
    return getNextItem();
  }
 else   if ("String_Node_Str".equals(name)) {
    return getLastItem();
  }
 else {
    return getItemByIndex(getChildIndex(name));
  }
}

Fixed version (ground truth):
public AbstractTogglePanelItem getItem(String name){
  if (META_NAME_FIRST.equals(name)) {
    return getFirstItem();
  }
 else   if (META_NAME_PREV.equals(name)) {
    return getPrevItem();
  }
 else   if (META_NAME_NEXT.equals(name)) {
    return getNextItem();
  }
 else   if (META_NAME_LAST.equals(name)) {
    return getLastItem();
  }
 else {
    return getItemByIndex(getChildIndex(name));
  }
}
Program: 18170
Project: 18170
Buggy source:
protected static void hidePanelItem(UIComponent item){
  item.getAttributes().put(RendererUtils.HTML.STYLE_ATTRIBUTE,"String_Node_Str");
}

Fixed version (ground truth):
protected static void hidePanelItem(UIComponent item){
  Map<String,Object> attrs=item.getAttributes();
  Object style=attrs.get(RendererUtils.HTML.STYLE_ATTRIBUTE);
  attrs.put(RendererUtils.HTML.STYLE_ATTRIBUTE,"String_Node_Str" + style);
}
Program: 18171
Project: 18171
Buggy source:
public String getName(){
  return (String)getStateHelper().eval(PropertyKeys.name);
}

Fixed version (ground truth):
public String getName(){
  return (String)getStateHelper().eval(PropertyKeys.name,getId());
}
Program: 18172
Project: 18172
Buggy source:
public String getTargetItem(){
  return (String)getStateHelper().eval(PropertyKeys.targetItem);
}

Fixed version (ground truth):
public String getTargetItem(){
  return (String)getStateHelper().eval(PropertyKeys.targetItem,AbstractTogglePanel.META_NAME_NEXT);
}
Program: 18173
Project: 18173
Buggy source:
/** 
 * <p><span class="changed_modified_2_0">Call</span> through to the  {@link MethodExpression} passed in our constructor.  <spanclass="changed_added_2_0">First, try to invoke the <code>MethodExpression</code> passed to the constructor of this instance, passing the argument  {@link ItemChangeEvent} as theargument.  If a  {@link MethodNotFoundException} is thrown, callto the zero argument <code>MethodExpression</code> derived from the <code>MethodExpression</code> passed to the constructor of this instance.  If that fails for any reason, throw an  {@link AbortProcessingException}, including the cause of the failure.</span></p>
 * @throws NullPointerException {@inheritDoc}
 * @throws AbortProcessingException {@inheritDoc}
 */
public void processItemChange(ItemChangeEvent itemChangeEvent) throws AbortProcessingException {
  if (itemChangeEvent == null) {
    throw new NullPointerException();
  }
  FacesContext context=FacesContext.getCurrentInstance();
  ELContext elContext=context.getELContext();
  try {
    methodExpressionOneArg.invoke(elContext,new Object[]{itemChangeEvent});
  }
 catch (  MethodNotFoundException mnf) {
    if (null != methodExpressionZeroArg) {
      try {
        methodExpressionZeroArg.invoke(elContext,NO_PARAMS);
      }
 catch (      ELException e) {
        throw new AbortProcessingException(e.getMessage(),e.getCause());
      }
    }
  }
catch (  ELException e) {
    throw new AbortProcessingException(e.getMessage(),e.getCause());
  }
}

Fixed version (ground truth):
public void processItemChange(ItemChangeEvent itemChangeEvent) throws AbortProcessingException {
  processEvent(itemChangeEvent);
}
Program: 18174
Project: 18174
Buggy source:
/** 
 * <p>Construct a   {@link ItemChangeListener} that contains a {@link MethodExpression}.</p>
 * @param methodExpressionOneArg
 * @param methodExpressionZeroArg
 */
public MethodExpressionItemChangeListener(MethodExpression methodExpressionOneArg,MethodExpression methodExpressionZeroArg){
  super();
  this.methodExpressionOneArg=methodExpressionOneArg;
  this.methodExpressionZeroArg=methodExpressionZeroArg;
}

Fixed version (ground truth):
public MethodExpressionItemChangeListener(MethodExpression methodExprOneArg,MethodExpression methodExprZeroArg){
  super(methodExprOneArg,methodExprZeroArg);
}
Program: 18175
Project: 18175
Buggy source:
private void encodeHeader(FacesContext facesContext,UIComponent component,ResponseWriter writer,String state,Boolean isDisplay) throws IOException {
  writer.startElement("String_Node_Str",component);
  if (!isDisplay) {
    writer.writeAttribute("String_Node_Str","String_Node_Str",null);
  }
  String name="String_Node_Str" + capitalize(state);
  writer.writeAttribute("String_Node_Str","String_Node_Str" + state + "String_Node_Str"+ attributeAsString(component,name),name);
  UIComponent headerFacet=component.getFacet("String_Node_Str" + capitalize(state));
  if (headerFacet != null && headerFacet.isRendered()) {
    headerFacet.encodeAll(facesContext);
  }
 else {
    Object headerText=component.getAttributes().get("String_Node_Str");
    if (headerText != null && !headerText.equals("String_Node_Str")) {
      writer.writeText(headerText,null);
    }
  }
  writer.endElement("String_Node_Str");
}

Fixed version (ground truth):
private void encodeHeader(FacesContext facesContext,AbstractTogglePanelTitledItem component,ResponseWriter writer,HeaderStates state,Boolean isDisplay) throws IOException {
  writer.startElement("String_Node_Str",component);
  if (!isDisplay) {
    writer.writeAttribute("String_Node_Str","String_Node_Str",null);
  }
  String name="String_Node_Str" + capitalize(state.toString());
  writer.writeAttribute("String_Node_Str","String_Node_Str" + state + "String_Node_Str"+ attributeAsString(component,name),name);
  UIComponent headerFacet=component.getHeaderFacet(state);
  if (headerFacet != null && headerFacet.isRendered()) {
    headerFacet.encodeAll(facesContext);
  }
 else {
    Object headerText=component.getAttributes().get("String_Node_Str");
    if (headerText != null && !headerText.equals("String_Node_Str")) {
      writer.writeText(headerText,null);
    }
  }
  writer.endElement("String_Node_Str");
}
Program: 18178
Project: 18178
Buggy source:
public List<CommonErrorData> createTestCommonErrorDataList(int errorQuantity){
  List<CommonErrorData> commonErrorDataList=new ArrayList<CommonErrorData>();
  for (int i=0; i < errorQuantity; i++) {
    CommonErrorData e=new CommonErrorData();
    e.setCategory(ErrorCategory.APPLICATION);
    e.setSeverity(ErrorSeverity.ERROR);
    e.setCause("String_Node_Str");
    e.setDomain("String_Node_Str");
    e.setSubdomain("String_Node_Str");
    e.setErrorName("String_Node_Str");
    e.setErrorId(new Long(i));
    e.setMessage("String_Node_Str" + i);
    e.setOrganization("String_Node_Str");
    commonErrorDataList.add(e);
  }
  return commonErrorDataList;
}

Fixed version (ground truth):
public List<CommonErrorData> createTestCommonErrorDataList(int errorQuantity){
  List<CommonErrorData> commonErrorDataList=new ArrayList<CommonErrorData>();
  for (int i=0; i < errorQuantity; i++) {
    CommonErrorData e=new CommonErrorData();
    e.setCategory(ErrorCategory.APPLICATION);
    e.setSeverity(ErrorSeverity.ERROR);
    e.setCause("String_Node_Str");
    e.setDomain("String_Node_Str");
    e.setSubdomain("String_Node_Str");
    e.setErrorName("String_Node_Str");
    e.setErrorId(Long.valueOf(i));
    e.setMessage("String_Node_Str" + i);
    e.setOrganization("String_Node_Str");
    commonErrorDataList.add(e);
  }
  return commonErrorDataList;
}
Program: 18180
Project: 18180
Buggy source:
@Test public void testJaxbXmlNoRoot() throws Exception {
  MyObject msg=new MyObject();
  msg.setId(12345);
  HashMap<String,String> options=new HashMap<String,String>();
  options.put("String_Node_Str","String_Node_Str");
  ISerializerFactory serFactory=new XMLSerializerFactory();
  serFactory.init(new TestSerInitContext(options));
  IDeserializerFactory deserFactory=new XMLDeserializerFactory();
  deserFactory.init(new TestDeserInitContext(options));
  doTest(msg,BindingConstants.PAYLOAD_XML,SOAConstants.MIME_XML,serFactory,deserFactory,"String_Node_Str");
}

Fixed version (ground truth):
@Test public void testJaxbXmlNoRoot() throws Exception {
  MyObject msg=new MyObject();
  msg.setId(12345);
  HashMap<String,String> options=new HashMap<String,String>();
  options.put("String_Node_Str","String_Node_Str");
  ISerializerFactory serFactory=new XMLSerializerFactory();
  serFactory.init(new TestSerInitContext(options));
  IDeserializerFactory deserFactory=new XMLDeserializerFactory();
  deserFactory.init(new TestDeserInitContext(options));
  doTest(msg,BindingConstants.PAYLOAD_XML,SOAConstants.MIME_XML,serFactory,deserFactory,"String_Node_Str" + Charset.defaultCharset().displayName() + "String_Node_Str");
}
Program: 18181
Project: 18181
Buggy source:
@Test public void testJaxbXmlNoRootFalse() throws Exception {
  MyObject msg=new MyObject();
  msg.setId(12345);
  HashMap<String,String> options=new HashMap<String,String>();
  options.put("String_Node_Str","String_Node_Str");
  ISerializerFactory serFactory=new XMLSerializerFactory();
  serFactory.init(new TestSerInitContext(options));
  IDeserializerFactory deserFactory=new XMLDeserializerFactory();
  deserFactory.init(new TestDeserInitContext(options));
  doTest(msg,BindingConstants.PAYLOAD_XML,SOAConstants.MIME_XML,serFactory,deserFactory,"String_Node_Str");
}

Fixed version (ground truth):
@Test public void testJaxbXmlNoRootFalse() throws Exception {
  MyObject msg=new MyObject();
  msg.setId(12345);
  HashMap<String,String> options=new HashMap<String,String>();
  options.put("String_Node_Str","String_Node_Str");
  ISerializerFactory serFactory=new XMLSerializerFactory();
  serFactory.init(new TestSerInitContext(options));
  IDeserializerFactory deserFactory=new XMLDeserializerFactory();
  deserFactory.init(new TestDeserInitContext(options));
  doTest(msg,BindingConstants.PAYLOAD_XML,SOAConstants.MIME_XML,serFactory,deserFactory,"String_Node_Str" + Charset.defaultCharset().displayName() + "String_Node_Str");
}
Program: 18182
Project: 18182
Buggy source:
private boolean ableToCreatePlayers(){
  StartDialog dialog=new StartDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
  dialog.open();
  if (dialog.getReturnCode() == Dialog.OK) {
    leftProgrammer.resetStats();
    rightProgrammer.resetStats();
    leftProgrammer.setName(dialog.getPlayerOneName());
    rightProgrammer.setName(dialog.getPlayerTwoName());
    leftProgrammer.setAvatar(dialog.getPlayerOneAvatar());
    rightProgrammer.setAvatar(dialog.getPlayerTwoAvatar());
    return true;
  }
  return false;
}

Fixed version (ground truth):
private boolean ableToCreatePlayers(){
  StartDialog dialog=new StartDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
  dialog.open();
  if (dialog.getReturnCode() == Dialog.OK) {
    leftProgrammer.resetStats();
    rightProgrammer.resetStats();
    leftProgrammer.setName(dialog.getPlayerOneName());
    rightProgrammer.setName(dialog.getPlayerTwoName());
    leftProgrammer.setAvatar(dialog.getPlayerOneAvatar());
    rightProgrammer.setAvatar(dialog.getPlayerTwoAvatar());
    scoreboard.resetStats();
    updateScore(scoreboard.getScore());
    return true;
  }
  return false;
}
Program: 18183
Project: 18183
Buggy source:
public Stream<JsonElement> map(BiFunction<String,JsonElement,JsonElement> f){
  return entrySet().stream().map(e -> f.apply(e.getKey(),e.getValue()));
}

Fixed version (ground truth):
public void map(BiFunction<String,JsonElement,JsonElement> f){
  entrySet().stream().forEach(e -> {
    put(e.getKey(),f.apply(e.getKey(),e.getValue()));
  }
);
}
Program: 18184
Project: 18184
Buggy source:
public void shouldRecurseOverAllNestedMapElements(){
  JsonObject object=object(field("String_Node_Str","String_Node_Str"),field("String_Node_Str","String_Node_Str"),field("String_Node_Str",array(object(field("String_Node_Str",1)))),field("String_Node_Str",object(field("String_Node_Str",42))));
  AtomicInteger counter=new AtomicInteger();
  object.forEachPrimitiveRecursive((k,v) -> {
    counter.incrementAndGet();
  }
);
  assertThat(counter.get()).isEqualTo(4);
}

Fixed version (ground truth):
public void shouldRecurseOverAllNestedMapElements(){
  JsonObject object=object(field("String_Node_Str","String_Node_Str"),field("String_Node_Str","String_Node_Str"),field("String_Node_Str",array(object(field("String_Node_Str",1)))),field("String_Node_Str",array(object(field("String_Node_Str",1)))),field("String_Node_Str",object(field("String_Node_Str",42))));
  AtomicInteger counter=new AtomicInteger();
  object.forEachPrimitiveRecursive((k,v) -> {
    counter.incrementAndGet();
  }
);
  assertThat(counter.get()).isEqualTo(5);
}
Program: 18185
Project: 18185
Buggy source:
/** 
 * @param t1
 * @param t2
 * @return true if t1 equals t2
 */
boolean equals(JsonElement t1,JsonElement t2);

Fixed version (ground truth):
/** 
 * @param t1 first element
 * @param t2 second element
 * @return true if t1 equals t2
 */
boolean equals(JsonElement t1,JsonElement t2);
Program: 18186
Project: 18186
Buggy source:
public JsonElement get(){
  return stack.getLast();
}

Fixed version (ground truth):
public JsonElement get(){
  if (stack.size() == 0) {
    throw new JsonParseException("String_Node_Str");
  }
  return stack.getLast();
}
Program: 18187
Project: 18187
Buggy source:
private JsonElement parseContent(com.fasterxml.jackson.core.JsonParser parser) throws IOException, com.fasterxml.jackson.core.JsonParseException {
  JsonHandler handler=new JsonHandler();
  LinkedList<Boolean> stack=new LinkedList<>();
  JsonToken nextToken;
  handler.startJSON();
  while ((nextToken=parser.nextToken()) != null) {
switch (nextToken) {
case START_OBJECT:
      handler.startObject();
    break;
case END_OBJECT:
  handler.endObject();
endObjEntryIfNeeded(handler,stack);
break;
case START_ARRAY:
handler.startArray();
stack.push(false);
break;
case END_ARRAY:
handler.endArray();
stack.pop();
endObjEntryIfNeeded(handler,stack);
break;
case FIELD_NAME:
handler.startObjectEntry(parser.getText());
stack.push(true);
break;
case VALUE_NUMBER_INT:
handler.primitive(parser.getLongValue());
endObjEntryIfNeeded(handler,stack);
break;
case VALUE_NUMBER_FLOAT:
handler.primitive(parser.getDoubleValue());
endObjEntryIfNeeded(handler,stack);
break;
case VALUE_STRING:
handler.primitive(parser.getText());
endObjEntryIfNeeded(handler,stack);
break;
case VALUE_NULL:
handler.primitive(null);
endObjEntryIfNeeded(handler,stack);
break;
case VALUE_TRUE:
handler.primitive(true);
endObjEntryIfNeeded(handler,stack);
break;
case VALUE_FALSE:
handler.primitive(false);
endObjEntryIfNeeded(handler,stack);
break;
default :
throw new IllegalStateException("String_Node_Str" + nextToken);
}
}
handler.endJSON();
return handler.get();
}

Fixed version (ground truth):
private JsonElement parseContent(com.fasterxml.jackson.core.JsonParser parser) throws IOException, com.fasterxml.jackson.core.JsonParseException {
  JsonHandler handler=new JsonHandler();
  LinkedList<Boolean> stack=new LinkedList<>();
  JsonToken nextToken;
  handler.startJSON();
  while ((nextToken=parser.nextToken()) != null) {
switch (nextToken) {
case START_OBJECT:
      handler.startObject();
    break;
case END_OBJECT:
  handler.endObject();
endObjEntryIfNeeded(handler,stack);
break;
case START_ARRAY:
handler.startArray();
stack.push(false);
break;
case END_ARRAY:
handler.endArray();
stack.pop();
endObjEntryIfNeeded(handler,stack);
break;
case FIELD_NAME:
handler.startObjectEntry(parser.getText());
stack.push(true);
break;
case VALUE_NUMBER_INT:
handler.primitive(parser.getLongValue());
endObjEntryIfNeeded(handler,stack);
break;
case VALUE_NUMBER_FLOAT:
handler.primitive(parser.getDoubleValue());
endObjEntryIfNeeded(handler,stack);
break;
case VALUE_STRING:
handler.primitive(parser.getText());
endObjEntryIfNeeded(handler,stack);
break;
case VALUE_NULL:
handler.primitive(null);
endObjEntryIfNeeded(handler,stack);
break;
case VALUE_TRUE:
handler.primitive(true);
endObjEntryIfNeeded(handler,stack);
break;
case VALUE_FALSE:
handler.primitive(false);
endObjEntryIfNeeded(handler,stack);
break;
case NOT_AVAILABLE:
break;
case VALUE_EMBEDDED_OBJECT:
throw new IllegalStateException("String_Node_Str" + nextToken);
default :
throw new IllegalStateException("String_Node_Str" + nextToken);
}
}
handler.endJSON();
return handler.get();
}
Program: 18188
Project: 18188
Buggy source:
/** 
 * @param value
 * @return a JsonPrimitive with the value
 */
public static JsonPrimitive primitive(final Object value){
  return new JsonPrimitive(value);
}

Fixed version (ground truth):
/** 
 * @param value
 * @return a JsonPrimitive with the value
 */
public static JsonPrimitive primitive(final Object value){
  if (value instanceof JsonPrimitive) {
    return ((JsonPrimitive)value).deepClone();
  }
  return new JsonPrimitive(value);
}
Program: 18189
Project: 18189
Buggy source:
@Override public boolean equals(final Object o){
  if (o == null) {
    return false;
  }
  if (!(o instanceof JsonArray)) {
    return false;
  }
  JsonArray array=(JsonArray)o;
  if (size() != array.size()) {
    return false;
  }
  for (  JsonElement jsonElement : array) {
    if (!contains(jsonElement)) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean equals(final Object o){
  if (o == null) {
    return false;
  }
  if (!(o instanceof JsonArray)) {
    return false;
  }
  JsonArray array=(JsonArray)o;
  if (size() != array.size()) {
    return false;
  }
  for (int i=0; i < size(); i++) {
    if (!get(i).equals(array.get(i))) {
      return false;
    }
  }
  return true;
}
Program: 18190
Project: 18190
Buggy source:
@Override public boolean endObjectEntry() throws ParseException, IOException {
  JsonElement value=stack.pollLast();
  JsonElement key=stack.pollLast();
  JsonObject container=stack.peekLast().asObject();
  container.put(key.toString(),value);
  return true;
}

Fixed version (ground truth):
@Override public boolean endObjectEntry() throws ParseException, IOException {
  JsonElement value=stack.pollLast();
  JsonElement e=stack.peekLast();
  if (e.isPrimitive()) {
    e=stack.pollLast();
    JsonElement last=stack.peekLast();
    if (last.isObject()) {
      JsonObject container=last.asObject();
      container.put(e.toString(),value);
    }
 else     if (last.isArray()) {
      System.out.println("String_Node_Str" + value + "String_Node_Str"+ e+ "String_Node_Str"+ last);
    }
  }
 else   if (e.isArray()) {
    e.asArray().add(value);
  }
 else {
    System.out.println(e);
  }
  return true;
}
Program: 18191
Project: 18191
Buggy source:
@Override public boolean endArray() throws ParseException, IOException {
  return true;
}

Fixed version (ground truth):
@Override public boolean endArray() throws ParseException, IOException {
  if (stack.size() > 3) {
    System.out.println(stack);
    JsonElement value=stack.pollLast();
    if (value.isArray()) {
      JsonElement e=stack.peekLast();
      if (e.isArray()) {
        e.asArray().add(value);
      }
 else {
        JsonPrimitive key=e.asPrimitive();
        JsonElement last=stack.peekLast();
        if (last.isObject()) {
          JsonObject container=last.asObject();
          container.put(key.toString(),value);
        }
 else {
          throw new IllegalStateException("String_Node_Str");
        }
      }
    }
 else {
      throw new IllegalStateException("String_Node_Str");
    }
  }
  return true;
}
Program: 18192
Project: 18192
Buggy source:
@Override public boolean endObject() throws ParseException, IOException {
  return true;
}

Fixed version (ground truth):
@Override public boolean endObject() throws ParseException, IOException {
  if (stack.size() > 1 && stack.get(stack.size() - 2).isArray()) {
    JsonElement object=stack.pollLast();
    stack.peekLast().asArray().add(object);
  }
  return true;
}
Program: 18193
Project: 18193
Buggy source:
@DataProvider public Object[][] goodJson(){
  return new Object[][]{{object().put("String_Node_Str",1).get()},{object().put("String_Node_Str",true).get()},{object().put("String_Node_Str","String_Node_Str").get()},{object().put("String_Node_Str","String_Node_Str").get()},{object().put("String_Node_Str",(String)null).get()},{object().put("String_Node_Str",array("String_Node_Str")).get()},{object().put("String_Node_Str",array("String_Node_Str","String_Node_Str")).get()},{object().put("String_Node_Str",array("String_Node_Str","String_Node_Str")).put("String_Node_Str","String_Node_Str").get()},{object().put("String_Node_Str","String_Node_Str").put("String_Node_Str",array("String_Node_Str","String_Node_Str")).get()},{object().put("String_Node_Str","String_Node_Str").put("String_Node_Str",array("String_Node_Str","String_Node_Str")).put("String_Node_Str",object().get()).get()},{object().get()},{new JsonArray()},{primitive(true)},{primitive(false)},{primitive(42)},{primitive(42.0)},{primitive("String_Node_Str")},{array("String_Node_Str")},{array("String_Node_Str","String_Node_Str")}};
}

Fixed version (ground truth):
@DataProvider public Object[][] goodJson(){
  return new Object[][]{{object().put("String_Node_Str",1).get()},{object().put("String_Node_Str",true).get()},{object().put("String_Node_Str","String_Node_Str").get()},{object().put("String_Node_Str","String_Node_Str").get()},{object().put("String_Node_Str",(String)null).get()},{object().put("String_Node_Str",array("String_Node_Str")).get()},{object().put("String_Node_Str",array("String_Node_Str","String_Node_Str")).get()},{object().put("String_Node_Str",array("String_Node_Str","String_Node_Str")).put("String_Node_Str","String_Node_Str").get()},{object().put("String_Node_Str","String_Node_Str").put("String_Node_Str",array("String_Node_Str","String_Node_Str")).get()},{object().put("String_Node_Str","String_Node_Str").put("String_Node_Str",array("String_Node_Str","String_Node_Str")).put("String_Node_Str",object().get()).get()},{object().get()},{new JsonArray()},{primitive(true)},{primitive(false)},{primitive(42)},{primitive(42.0)},{primitive("String_Node_Str")},{array("String_Node_Str")},{array("String_Node_Str","String_Node_Str")},{object().put("String_Node_Str","String_Node_Str").put("String_Node_Str",array(primitive("String_Node_Str"),primitive("String_Node_Str"),object().put("String_Node_Str","String_Node_Str").get(),array("String_Node_Str"))).put("String_Node_Str",42).put("String_Node_Str",42.0).put("String_Node_Str",true).put("String_Node_Str",nullValue()).put("String_Node_Str",array("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str")).get()}};
}
Program: 18194
Project: 18194
Buggy source:
/** 
 * {@inheritDoc}
 * @see org.easysoa.frascati.api.FraSCAtiServiceItf#processComposite(java.lang.String)
 */
public Composite processComposite(String composite) throws FraSCAtiServiceException {
  return processComposite(composite,FraSCAtiServiceItf.all,null);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 * @see org.easysoa.frascati.api.FraSCAtiServiceItf#processComposite(java.lang.String)
 */
public Composite processComposite(String composite) throws FraSCAtiServiceException {
  return processComposite(composite,FraSCAtiServiceItf.all,new Properties());
}
Program: 18195
Project: 18195
Buggy source:
/** 
 * Start the filter
 * @param httpExchangeHandler The http exchange handler to use for exchange recording
 * @throws Exception If a problem occurs
 */
void start(HttpExchangeHandler httpExchangeHandler) throws Exception ;

Fixed version (ground truth):
/** 
 * Start the filter
 * @param httpExchangeHandler The http exchange handler to use for exchange recording
 * @throws Exception If a problem occurs
 */
void start(MessageHandler httpExchangeHandler) throws Exception ;
Program: 18196
Project: 18196
Buggy source:
/** 
 * Process the filter 
 */
public void doFilter(ServletRequest request,ServletResponse response,FilterChain chain) throws IOException, ServletException {
  if (exchangeHandler != null) {
    logger.info("String_Node_Str");
    if (!(request instanceof CopyHttpServletResponse)) {
      request=new CopyHttpServletRequest((HttpServletRequest)request);
    }
    if (!(response instanceof CopyHttpServletResponse)) {
      response=new CopyHttpServletResponse((HttpServletResponse)response);
    }
  }
  chain.doFilter(request,response);
  if (exchangeHandler != null) {
    if (request instanceof HttpServletRequest) {
      try {
        InMessage inMessage=new InMessage((CopyHttpServletRequest)request);
        OutMessage outMessage=new OutMessage((CopyHttpServletResponse)response);
        this.exchangeHandler.handleMessage(inMessage,outMessage);
      }
 catch (      Exception e) {
        logger.error("String_Node_Str",e);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Process the filter
 */
public void doFilter(ServletRequest request,ServletResponse response,FilterChain chain) throws IOException, ServletException {
  if (exchangeHandler != null) {
    logger.info("String_Node_Str");
    if (!(request instanceof CopyHttpServletResponse)) {
      request=new CopyHttpServletRequest((HttpServletRequest)request);
    }
    if (!(response instanceof CopyHttpServletResponse)) {
      response=new CopyHttpServletResponse((HttpServletResponse)response);
    }
  }
  chain.doFilter(request,response);
  if (exchangeHandler != null) {
    if (request instanceof HttpServletRequest) {
      try {
        InMessage inMessage=new InMessage((CopyHttpServletRequest)request);
        OutMessage outMessage=new OutMessage((CopyHttpServletResponse)response);
        this.exchangeHandler.handleMessage(inMessage,outMessage);
      }
 catch (      Exception e) {
        logger.error("String_Node_Str",e);
      }
    }
  }
}
Program: 18197
Project: 18197
Buggy source:
/** 
 * Start the mining
 */
public void start(HttpExchangeHandler exchangeHandler) throws Exception {
  if (singleton != null) {
    logger.info("String_Node_Str" + exchangeHandler.toString());
    singleton.exchangeHandler=exchangeHandler;
  }
 else {
    logger.warn("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Start the mining
 */
public void start(MessageHandler exchangeHandler) throws Exception {
  if (singleton != null) {
    logger.info("String_Node_Str" + exchangeHandler.toString());
    singleton.exchangeHandler=exchangeHandler;
  }
 else {
    logger.warn("String_Node_Str");
  }
}
Program: 18198
Project: 18198
Buggy source:
public void handleExchange(HttpServletRequest request,HttpServletResponse response) throws Exception {
  if (enabled) {
    CopyHttpServletRequest requestWrapper=new CopyHttpServletRequest(request);
    CopyHttpServletResponse responseWrapper;
    if (response instanceof CopyHttpServletResponse) {
      responseWrapper=(CopyHttpServletResponse)response;
    }
 else {
      responseWrapper=new CopyHttpServletResponse(response);
    }
    InMessage inMessage=new InMessage(requestWrapper);
    OutMessage outMessage=new OutMessage(responseWrapper);
    this.handleMessage(inMessage,outMessage);
  }
}

Fixed version (ground truth):
@Deprecated public void handleExchange(HttpServletRequest request,HttpServletResponse response) throws Exception {
  if (enabled) {
    CopyHttpServletRequest requestWrapper=new CopyHttpServletRequest(request);
    CopyHttpServletResponse responseWrapper;
    if (response instanceof CopyHttpServletResponse) {
      responseWrapper=(CopyHttpServletResponse)response;
    }
 else {
      responseWrapper=new CopyHttpServletResponse(response);
    }
    InMessage inMessage=new InMessage(requestWrapper);
    OutMessage outMessage=new OutMessage(responseWrapper);
    this.handleMessage(inMessage,outMessage);
  }
}
Program: 18201
Project: 18201
Buggy source:
/** 
 * Test the EasySOAv1SOAPDiscoveryMessageHandler with a WSDL file get request
 * @throws Exception
 */
@Test public void WsdlDiscoveryMessageHandlerTest() throws Exception {
  EasySOAv1SOAPDiscoveryMessageHandler handler=new EasySOAv1SOAPDiscoveryMessageHandler();
  PropertyManager pm=new PropertyManager("String_Node_Str");
  ProxyConfiguration proxyConf=new ProxyConfiguration();
  proxyConf.addParameter(EasySOAGeneratedAppConfiguration.ENVIRONMENT_PARAM_NAME,"String_Node_Str");
  proxyConf.addParameter(EasySOAGeneratedAppConfiguration.PROJECTID_PARAM_NAME,"String_Node_Str");
  ExchangeRecord record=new ExchangeRecord();
  record.setExchange(new Exchange());
  record.setInMessage(new InMessage());
  record.setOutMessage(new OutMessage());
  record.getInMessage().setProtocol("String_Node_Str");
  record.getInMessage().setMethod("String_Node_Str");
  record.getInMessage().setPath("String_Node_Str");
  record.getInMessage().setServer("String_Node_Str");
  handler.setHandlerConfiguration(proxyConf);
  handler.handleMessage(record.getInMessage(),record.getOutMessage());
}

Fixed version (ground truth):
/** 
 * Test the EasySOAv1SOAPDiscoveryMessageHandler with a WSDL file get request
 * @throws Exception
 */
@Test public void WsdlDiscoveryMessageHandlerTest() throws Exception {
  EasySOAv1SOAPDiscoveryMessageHandler handler=new EasySOAv1SOAPDiscoveryMessageHandler();
  PropertyManager pm=new PropertyManager("String_Node_Str");
  ProxyConfiguration proxyConf=new ProxyConfiguration();
  proxyConf.addParameter(EasySOAGeneratedAppConfiguration.ENVIRONMENT_PARAM_NAME,"String_Node_Str");
  proxyConf.addParameter(EasySOAGeneratedAppConfiguration.PROJECTID_PARAM_NAME,"String_Node_Str");
  ExchangeRecord record=new ExchangeRecord();
  record.setExchange(new Exchange());
  record.setInMessage(new InMessage());
  record.setOutMessage(new OutMessage());
  record.getInMessage().setProtocol("String_Node_Str");
  record.getInMessage().setMethod("String_Node_Str");
  record.getInMessage().setPath("String_Node_Str");
  record.getInMessage().setServer("String_Node_Str");
  record.getInMessage().setRemoteHost("String_Node_Str");
  record.getInMessage().setRemoteAddress("String_Node_Str");
  handler.setHandlerConfiguration(proxyConf);
  handler.handleMessage(record.getInMessage(),record.getOutMessage());
}
Program: 18202
Project: 18202
Buggy source:
/** 
 * Test the EasySOAv1SOAPDiscoveryMessageHandler with a SOAP Post request
 * @throws Exception
 */
@Test public void SoapDiscoveryMessageHandlerTest() throws Exception {
  EasySOAv1SOAPDiscoveryMessageHandler handler=new EasySOAv1SOAPDiscoveryMessageHandler();
  PropertyManager pm=new PropertyManager("String_Node_Str");
  String soapRequestContent="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  ProxyConfiguration proxyConf=new ProxyConfiguration();
  proxyConf.addParameter(EasySOAGeneratedAppConfiguration.ENVIRONMENT_PARAM_NAME,"String_Node_Str");
  proxyConf.addParameter(EasySOAGeneratedAppConfiguration.PROJECTID_PARAM_NAME,"String_Node_Str");
  ExchangeRecord record=new ExchangeRecord();
  record.setExchange(new Exchange());
  record.setInMessage(new InMessage());
  record.setOutMessage(new OutMessage());
  record.getInMessage().setProtocol("String_Node_Str");
  record.getInMessage().setMethod("String_Node_Str");
  record.getInMessage().setPath("String_Node_Str");
  record.getInMessage().setServer("String_Node_Str");
  MessageContent messageContent=new MessageContent();
  messageContent.setRawContent(soapRequestContent);
  record.getInMessage().setMessageContent(messageContent);
  handler.setHandlerConfiguration(proxyConf);
  handler.handleMessage(record.getInMessage(),record.getOutMessage());
}

Fixed version (ground truth):
/** 
 * Test the EasySOAv1SOAPDiscoveryMessageHandler with a SOAP Post request
 * @throws Exception
 */
@Test public void SoapDiscoveryMessageHandlerTest() throws Exception {
  EasySOAv1SOAPDiscoveryMessageHandler handler=new EasySOAv1SOAPDiscoveryMessageHandler();
  PropertyManager pm=new PropertyManager("String_Node_Str");
  String soapRequestContent="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  ProxyConfiguration proxyConf=new ProxyConfiguration();
  proxyConf.addParameter(EasySOAGeneratedAppConfiguration.ENVIRONMENT_PARAM_NAME,"String_Node_Str");
  proxyConf.addParameter(EasySOAGeneratedAppConfiguration.PROJECTID_PARAM_NAME,"String_Node_Str");
  ExchangeRecord record=new ExchangeRecord();
  record.setExchange(new Exchange());
  record.setInMessage(new InMessage());
  record.setOutMessage(new OutMessage());
  record.getInMessage().setProtocol("String_Node_Str");
  record.getInMessage().setMethod("String_Node_Str");
  record.getInMessage().setPath("String_Node_Str");
  record.getInMessage().setServer("String_Node_Str");
  record.getInMessage().setRemoteHost("String_Node_Str");
  record.getInMessage().setRemoteAddress("String_Node_Str");
  MessageContent messageContent=new MessageContent();
  messageContent.setRawContent(soapRequestContent);
  record.getInMessage().setMessageContent(messageContent);
  handler.setHandlerConfiguration(proxyConf);
  handler.handleMessage(record.getInMessage(),record.getOutMessage());
}
Program: 18203
Project: 18203
Buggy source:
/** 
 * Return the list of warning messages thrown during the last  processing process
 * @return the list of warning messages
 */
public List<String> getWarningMessages(){
  return warningMessages;
}

Fixed version (ground truth):
/** 
 * Return the list of warning messages thrown during the last processing process
 * @return the list of warning messages
 */
public List<String> getWarningMessages(){
  return warningMessages;
}
Program: 18204
Project: 18204
Buggy source:
/** 
 * Return the list of error messages thrown during the last  processing process
 * @return the list of error messages
 */
public List<String> getErrorMessages(){
  return errorMessages;
}

Fixed version (ground truth):
/** 
 * Return the list of error messages thrown during the last processing process
 * @return the list of error messages
 */
public List<String> getErrorMessages(){
  return errorMessages;
}
Program: 18206
Project: 18206
Buggy source:
@Override public Map<String,JavaServiceInterfaceInformation> findWSInterfaces(CodeDiscoveryMojo codeDiscovery,JavaSource[] sources,MavenDeliverableInformation mavenDeliverable,CodeDiscoveryRegistryClient registryClient,Log log) throws Exception {
  Map<String,JavaServiceInterfaceInformation> wsInjectableTypeSet=new HashMap<String,JavaServiceInterfaceInformation>();
  for (  JavaSource source : sources) {
    JavaClass[] classes=source.getClasses();
    for (    JavaClass c : classes) {
      boolean isWs=ParsingUtils.hasAnnotation(c,ANN_WS);
      boolean isInterface=c.isInterface();
      if (isWs && isInterface || ParsingUtils.hasAnnotation(c,ANN_XML_WSCLIENT) || ParsingUtils.hasAnnotation(c,ANN_WSPROVIDER) || ParsingUtils.hasAnnotation(c,ANN_XML_WSPROVIDER)) {
        wsInjectableTypeSet.put(c.getFullyQualifiedName(),new JavaServiceInterfaceInformation(mavenDeliverable.getGroupId(),mavenDeliverable.getArtifactId(),c.getFullyQualifiedName()));
      }
    }
  }
  Map<Type,MavenDeliverableInformation> mavenInfos=new HashMap<Type,MavenDeliverableInformation>();
  MavenProject mavenProject=codeDiscovery.getMavenProject();
  if (mavenProject != null) {
    for (    Object dependencyObject : mavenProject.getDependencyArtifacts()) {
      Artifact dependency=(Artifact)dependencyObject;
      URLClassLoader jarClassloader=new URLClassLoader(new URL[]{dependency.getFile().toURI().toURL()});
      Enumeration<URL> resources=jarClassloader.getResources("String_Node_Str");
      wsInjectableTypeSet.putAll(exploreResourcesForInterfaces(jarClassloader,resources));
    }
  }
  return wsInjectableTypeSet;
}

Fixed version (ground truth):
@Override public Map<String,JavaServiceInterfaceInformation> findWSInterfaces(CodeDiscoveryMojo codeDiscovery,JavaSource[] sources,MavenDeliverableInformation mavenDeliverable,CodeDiscoveryRegistryClient registryClient,Log log) throws Exception {
  Map<String,JavaServiceInterfaceInformation> wsInjectableTypeSet=new HashMap<String,JavaServiceInterfaceInformation>();
  for (  JavaSource source : sources) {
    JavaClass[] classes=source.getClasses();
    for (    JavaClass c : classes) {
      boolean isWs=ParsingUtils.hasAnnotation(c,ANN_WS);
      boolean isInterface=c.isInterface();
      if (isWs && isInterface || ParsingUtils.hasAnnotation(c,ANN_XML_WSCLIENT) || ParsingUtils.hasAnnotation(c,ANN_WSPROVIDER) || ParsingUtils.hasAnnotation(c,ANN_XML_WSPROVIDER)) {
        wsInjectableTypeSet.put(c.getFullyQualifiedName(),new JavaServiceInterfaceInformation(mavenDeliverable.getGroupId(),mavenDeliverable.getArtifactId(),c.getFullyQualifiedName()));
      }
    }
  }
  return wsInjectableTypeSet;
}
Program: 18207
Project: 18207
Buggy source:
private void addConsumerFoundInInjectedMember(List<JavaServiceConsumptionInformation> discoveredConsumptions,AbstractJavaEntity injectedMember,Type injectedType,String beanPropertyName,HashSet<String> injectedBeanProperties,Map<String,JavaServiceInterfaceInformation> serviceInterfaces,MavenDeliverable mavenDeliverable) throws Exception {
  if (injectedBeanProperties.contains(beanPropertyName)) {
    return;
  }
  String injectionAnnotation=getInjectionAnnotation(injectedMember);
  if (allInjected || injectionAnnotation != null) {
    if (serviceInterfaces.containsKey(injectedType)) {
      discoveredConsumptions.add(new JavaServiceConsumptionInformation(mavenDeliverable.getSoaNodeId(),null,injectedType.toGenericString(),injectedType.getJavaClass().getSource().getURL().toString()));
      injectedBeanProperties.add(beanPropertyName);
    }
  }
}

Fixed version (ground truth):
private void addConsumerFoundInInjectedMember(List<JavaServiceConsumptionInformation> discoveredConsumptions,AbstractJavaEntity injectedMember,Type injectedType,String beanPropertyName,HashSet<String> injectedBeanProperties,Map<String,JavaServiceInterfaceInformation> serviceInterfaces,MavenDeliverable mavenDeliverable) throws Exception {
  if (injectedBeanProperties.contains(beanPropertyName)) {
    return;
  }
  String injectionAnnotation=getInjectionAnnotation(injectedMember);
  if (allInjected || injectionAnnotation != null) {
    if (serviceInterfaces.containsKey(injectedType.getFullyQualifiedName())) {
      discoveredConsumptions.add(new JavaServiceConsumptionInformation(mavenDeliverable.getSoaNodeId(),null,injectedType.toGenericString(),injectedType.getJavaClass().getSource().getURL().toString()));
      injectedBeanProperties.add(beanPropertyName);
    }
  }
}