nus-yam/ex-repair huggingface dataset:
Program: 147483
Project: 147483
Buggy source:
/** 
 * Creates the dialogs contents
 * @param shell
 */
private void createContents(final Shell shell){
  shell.setLayout(new GridLayout(2,true));
  Label label=new Label(shell,SWT.NONE);
  label.setText(message);
  GridData data=new GridData();
  data.horizontalSpan=2;
  label.setLayoutData(data);
  final Text text=new Text(shell,SWT.BORDER);
  data=new GridData(GridData.FILL_HORIZONTAL);
  data.horizontalSpan=2;
  text.setLayoutData(data);
  text.setText(String.valueOf(value));
  final Button ok=new Button(shell,SWT.PUSH);
  ok.setText("String_Node_Str");
  data=new GridData(GridData.FILL_HORIZONTAL);
  ok.setLayoutData(data);
  ok.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent event){
      input=text.getText();
      shell.close();
    }
  }
);
  Button cancel=new Button(shell,SWT.PUSH);
  cancel.setText("String_Node_Str");
  data=new GridData(GridData.FILL_HORIZONTAL);
  cancel.setLayoutData(data);
  cancel.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent event){
      input=null;
      shell.close();
    }
  }
);
  text.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    ModifyEvent e){
      if (getValue(text.getText()) != null) {
        ok.setEnabled(true);
      }
 else {
        ok.setEnabled(false);
      }
    }
  }
);
  shell.setDefaultButton(ok);
}

Fixed version (ground truth):
/** 
 * Creates the dialogs contents
 * @param shell
 */
private void createContents(final Shell shell){
  shell.setLayout(new GridLayout(2,true));
  Label label=new Label(shell,SWT.NONE);
  label.setText(message);
  GridData data=new GridData();
  data.horizontalSpan=2;
  label.setLayoutData(data);
  final Text text=new Text(shell,SWT.BORDER);
  data=new GridData(GridData.FILL_HORIZONTAL);
  data.horizontalSpan=2;
  text.setLayoutData(data);
  String sValue=!(value instanceof Character) ? String.valueOf(value) : String.valueOf((int)((Character)value).charValue());
  text.setText(sValue);
  final Button ok=new Button(shell,SWT.PUSH);
  ok.setText("String_Node_Str");
  data=new GridData(GridData.FILL_HORIZONTAL);
  ok.setLayoutData(data);
  ok.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent event){
      input=text.getText();
      shell.close();
    }
  }
);
  Button cancel=new Button(shell,SWT.PUSH);
  cancel.setText("String_Node_Str");
  data=new GridData(GridData.FILL_HORIZONTAL);
  cancel.setLayoutData(data);
  cancel.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent event){
      input=null;
      shell.close();
    }
  }
);
  text.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    ModifyEvent e){
      if (getValue(text.getText()) != null) {
        ok.setEnabled(true);
      }
 else {
        ok.setEnabled(false);
      }
    }
  }
);
  shell.setDefaultButton(ok);
}
Program: 147484
Project: 147484
Buggy source:
/** 
 * Creates a new dialog
 * @param parent
 * @param language
 * @param scale
 * @param value
 */
public KnobInputDialog(Shell parent,KnobDialogProfile language,KnobRange<T> scale,T value){
  super(parent,SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
  setText(language.getTitle());
  String message=language.getMessage();
  if ((scale instanceof KnobRange.Character) || (scale instanceof KnobRange.Long) || (scale instanceof KnobRange.Integer)) {
    message=message.replace("String_Node_Str",language.getInteger());
  }
 else {
    message=message.replace("String_Node_Str",language.getDecimal());
  }
  message=message.replace("String_Node_Str","String_Node_Str" + scale.getMinimum() + "String_Node_Str"+ scale.getMaximum()+ "String_Node_Str");
  this.message=message;
  this.scale=scale;
  this.value=value;
}

Fixed version (ground truth):
/** 
 * Creates a new dialog
 * @param parent
 * @param language
 * @param scale
 * @param value
 */
public KnobInputDialog(Shell parent,KnobDialogProfile language,KnobRange<T> scale,T value){
  super(parent,SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
  setText(language.getTitle());
  String message=language.getMessage();
  if ((scale instanceof KnobRange.Character) || (scale instanceof KnobRange.Long) || (scale instanceof KnobRange.Integer)) {
    message=message.replace("String_Node_Str",language.getInteger());
  }
 else {
    message=message.replace("String_Node_Str",language.getDecimal());
  }
  T min=scale.getMinimum();
  T max=scale.getMaximum();
  String sMin=!(min instanceof Character) ? String.valueOf(min) : String.valueOf((int)((Character)min).charValue());
  String sMax=!(max instanceof Character) ? String.valueOf(max) : String.valueOf((int)((Character)max).charValue());
  message=message.replace("String_Node_Str","String_Node_Str" + sMin + "String_Node_Str"+ sMax+ "String_Node_Str");
  this.message=message;
  this.scale=scale;
  this.value=value;
}
Program: 147486
Project: 147486
Buggy source:
/** 
 * Returns whether this is a retina device.  http://lubosplavucha.com/java/2013/09/02/retina-support-in-java-for-awt-swing/
 * @return
 */
private static boolean isRetina(){
  boolean isRetina=false;
  GraphicsDevice graphicsDevice=GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
  try {
    Field field=graphicsDevice.getClass().getDeclaredField("String_Node_Str");
    if (field != null) {
      field.setAccessible(true);
      Object scale=field.get(graphicsDevice);
      if (scale instanceof Integer && ((Integer)scale).intValue() == 2) {
        isRetina=true;
      }
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return isRetina;
}

Fixed version (ground truth):
/** 
 * Returns whether this is a retina device.  http://lubosplavucha.com/java/2013/09/02/retina-support-in-java-for-awt-swing/
 * @return
 */
private static boolean isRetina(){
  boolean isRetina=false;
  GraphicsDevice graphicsDevice=GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
  try {
    Field field=graphicsDevice.getClass().getDeclaredField("String_Node_Str");
    if (field != null) {
      field.setAccessible(true);
      Object scale=field.get(graphicsDevice);
      if (scale instanceof Integer && ((Integer)scale).intValue() == 2) {
        isRetina=true;
      }
    }
  }
 catch (  Exception e) {
  }
  return isRetina;
}
Program: 147487
Project: 147487
Buggy source:
/** 
 * Handle mouse buttons
 * @return
 */
private MouseAdapter createMouseButtonHandler(){
  return new MouseAdapter(){
    @Override public void mouseDoubleClick(    MouseEvent arg0){
      if (drag) {
        drag=false;
        getDisplay().setCursorLocation(screenX,screenY);
        Knob.this.setCursor(defaultCursor);
      }
      KnobInputDialog<T> dialog=new KnobInputDialog<T>(getShell(),dialogProfile,range,range.toExternal(value));
      T result=dialog.open();
      if (result != null) {
        value=range.toInternal(result);
        redraw();
      }
    }
    @Override public void mouseDown(    MouseEvent arg0){
      dragY=arg0.y;
      Point point=Knob.this.toDisplay(arg0.x,arg0.y);
      screenX=point.x;
      screenY=point.y;
      dragValue=value;
      dragOffset=0;
      drag=true;
      Knob.this.setCursor(hiddenCursor);
      Knob.this.setFocus();
    }
    @Override public void mouseUp(    MouseEvent arg0){
      if (drag) {
        drag=false;
        getDisplay().setCursorLocation(screenX,screenY);
        Knob.this.setCursor(defaultCursor);
      }
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Handle mouse buttons
 * @return
 */
private MouseAdapter createMouseButtonHandler(){
  return new MouseAdapter(){
    @Override public void mouseDoubleClick(    MouseEvent arg0){
      if (drag) {
        drag=false;
        getDisplay().setCursorLocation(screenX,screenY);
        Knob.this.setCursor(defaultCursor);
      }
      KnobInputDialog<T> dialog=new KnobInputDialog<T>(getShell(),dialogProfile,range,range.toExternal(value));
      T result=dialog.open();
      if (result != null) {
        value=range.toInternal(result);
        fireSelectionEvent();
        redraw();
      }
    }
    @Override public void mouseDown(    MouseEvent arg0){
      dragY=arg0.y;
      Point point=Knob.this.toDisplay(arg0.x,arg0.y);
      screenX=point.x;
      screenY=point.y;
      dragValue=value;
      dragOffset=0;
      drag=true;
      Knob.this.setCursor(hiddenCursor);
      Knob.this.setFocus();
    }
    @Override public void mouseUp(    MouseEvent arg0){
      if (drag) {
        drag=false;
        getDisplay().setCursorLocation(screenX,screenY);
        Knob.this.setCursor(defaultCursor);
      }
    }
  }
;
}
Program: 147488
Project: 147488
Buggy source:
@Override public void mouseDoubleClick(MouseEvent arg0){
  if (drag) {
    drag=false;
    getDisplay().setCursorLocation(screenX,screenY);
    Knob.this.setCursor(defaultCursor);
  }
  KnobInputDialog<T> dialog=new KnobInputDialog<T>(getShell(),dialogProfile,range,range.toExternal(value));
  T result=dialog.open();
  if (result != null) {
    value=range.toInternal(result);
    redraw();
  }
}

Fixed version (ground truth):
@Override public void mouseDoubleClick(MouseEvent arg0){
  if (drag) {
    drag=false;
    getDisplay().setCursorLocation(screenX,screenY);
    Knob.this.setCursor(defaultCursor);
  }
  KnobInputDialog<T> dialog=new KnobInputDialog<T>(getShell(),dialogProfile,range,range.toExternal(value));
  T result=dialog.open();
  if (result != null) {
    value=range.toInternal(result);
    fireSelectionEvent();
    redraw();
  }
}
Program: 147489
Project: 147489
Buggy source:
@Override public <T>Iterable<T> save(Iterable<T> entities){
  Map<T,RDFState> entityToExistingState=new HashMap<T,RDFState>();
  for (  T entity : entities) {
    @SuppressWarnings("String_Node_Str") SemanticPersistentEntity<T> persistentEntity=(SemanticPersistentEntity<T>)this.mappingContext.getPersistentEntity(entity.getClass());
    URI id=persistentEntity.getResourceId(entity);
    Model dbState=this.statementsCollector.getStatementsForResource(id,entity.getClass(),MappingPolicyImpl.DEFAULT_POLICY);
    entityToExistingState.put(entity,new RDFState(dbState));
  }
  return this.entityPersister.persistEntities(entityToExistingState);
}

Fixed version (ground truth):
@Override public <T>Iterable<T> save(Iterable<T> entities){
  Map<T,RDFState> entityToExistingState=new HashMap<T,RDFState>();
  for (  T entity : entities) {
    @SuppressWarnings("String_Node_Str") SemanticPersistentEntity<T> persistentEntity=(SemanticPersistentEntity<T>)this.mappingContext.getPersistentEntity(entity.getClass());
    URI id=persistentEntity.getResourceId(entity);
    Model dbState=this.statementsCollector.getStatementsForResourceOriginalPredicates(id,entity.getClass(),MappingPolicyImpl.DEFAULT_POLICY);
    entityToExistingState.put(entity,new RDFState(dbState));
  }
  return this.entityPersister.persistEntities(entityToExistingState);
}
Program: 147490
Project: 147490
Buggy source:
public String getGraphQueryForEntityClass(SemanticPersistentEntity<?> entity,Map<String,Object> propertyToValue){
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str");
  sb.append(getPropertyBindings(null,entity,propertyToValue,MappingPolicyImpl.ALL_POLICY));
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append(getPropertyPatterns(null,entity,propertyToValue,false,MappingPolicyImpl.ALL_POLICY));
  sb.append("String_Node_Str");
  return sb.toString();
}

Fixed version (ground truth):
public String getGraphQueryForEntityClass(SemanticPersistentEntity<?> entity,Map<String,Object> propertyToValue){
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str");
  sb.append(getPropertyBindings(null,entity,propertyToValue,MappingPolicyImpl.ALL_POLICY,false));
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append(getPropertyPatterns(null,entity,propertyToValue,false,MappingPolicyImpl.ALL_POLICY));
  sb.append("String_Node_Str");
  return sb.toString();
}
Program: 147491
Project: 147491
Buggy source:
/** 
 * Get bindings for the retrievable properties of the entity
 * @param uri - the uri of the entity
 * @param entity - the container holding the information about the entity's structure
 * @return
 */
protected String getPropertyBindings(URI uri,SemanticPersistentEntity<?> entity,Map<String,Object> propertyToValue,MappingPolicy globalMappingPolicy){
  StringBuilder sb=new StringBuilder();
  String subjectBinding=getSubjectBinding(uri,entity);
  AbstractPropertiesToQueryHandler.appendPattern(sb,subjectBinding,"String_Node_Str","String_Node_Str" + entity.getRDFType() + "String_Node_Str");
  PropertiesToBindingsHandler handler=new PropertiesToBindingsHandler(sb,subjectBinding,propertyToValue,this.mappingContext,globalMappingPolicy);
  entity.doWithProperties(handler);
  entity.doWithAssociations(handler);
  return sb.toString();
}

Fixed version (ground truth):
/** 
 * Get bindings for the retrievable properties of the entity
 * @param uri - the uri of the entity
 * @param entity - the container holding the information about the entity's structure
 * @return
 */
protected String getPropertyBindings(URI uri,SemanticPersistentEntity<?> entity,Map<String,Object> propertyToValue,MappingPolicy globalMappingPolicy,Boolean originalPredicates){
  StringBuilder sb=new StringBuilder();
  String subjectBinding=getSubjectBinding(uri,entity);
  AbstractPropertiesToQueryHandler.appendPattern(sb,subjectBinding,"String_Node_Str","String_Node_Str" + entity.getRDFType() + "String_Node_Str");
  PropertiesToBindingsHandler handler=new PropertiesToBindingsHandler(sb,subjectBinding,propertyToValue,this.mappingContext,globalMappingPolicy,originalPredicates);
  entity.doWithProperties(handler);
  entity.doWithAssociations(handler);
  return sb.toString();
}
Program: 147492
Project: 147492
Buggy source:
/** 
 * Create a graph query retrieving the molecule of an entity.  Only 'retrievable'   {@link #isRetrivableProperty(SemanticPersistentProperty)} properties will be fetched
 * @param uri - the uri of the entity
 * @param entity - the container which holds the information about that entity
 * @param propertiesToValues - the properties with their required values
 * @return
 */
public String getGraphQueryForResource(URI uri,SemanticPersistentEntity<?> entity,Map<String,Object> propertyToValue,MappingPolicy globalMappingPolicy){
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str");
  sb.append(getPropertyBindings(uri,entity,propertyToValue,globalMappingPolicy));
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append(getPropertyPatterns(uri,entity,propertyToValue,false,globalMappingPolicy));
  sb.append("String_Node_Str");
  return sb.toString();
}

Fixed version (ground truth):
/** 
 * Create a graph query retrieving the molecule of an entity.  Only 'retrievable'   {@link #isRetrivableProperty(SemanticPersistentProperty)} properties will be fetched
 * @param uri - the uri of the entity
 * @param entity - the container which holds the information about that entity
 * @param propertiesToValues - the properties with their required values
 * @return
 */
public String getGraphQueryForResource(URI uri,SemanticPersistentEntity<?> entity,Map<String,Object> propertyToValue,MappingPolicy globalMappingPolicy,Boolean originalPredicates){
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str");
  sb.append(getPropertyBindings(uri,entity,propertyToValue,globalMappingPolicy,originalPredicates));
  sb.append("String_Node_Str");
  sb.append("String_Node_Str");
  sb.append(getPropertyPatterns(uri,entity,propertyToValue,false,globalMappingPolicy));
  sb.append("String_Node_Str");
  return sb.toString();
}
Program: 147493
Project: 147493
Buggy source:
@Override public void write(Map<Object,RDFState> objectsAndState){
  RDFState mergedModel=new RDFState();
  for (  Entry<Object,RDFState> entry : objectsAndState.entrySet()) {
    Object source=entry.getKey();
    RDFState dbStatements=entry.getValue();
    final SemanticPersistentEntity<?> persistentEntity=mappingContext.getPersistentEntity(source.getClass());
    final BeanWrapper<Object> wrapper=BeanWrapper.<Object>create(source,conversionService);
    RDFState currentState=toStatementsConverter.convertEntityToStatements(persistentEntity,source);
    if (dbStatements != null && !dbStatements.isEmpty()) {
      Object dbObject=read(source.getClass(),dbStatements);
      RDFState dbState=toStatementsConverter.convertEntityToStatements(persistentEntity,dbObject);
      dbState.getCurrentStatements().removeAll(currentState.getCurrentStatements());
      currentState.setDeleteStatements(dbState.getCurrentStatements());
    }
    EntityState<Object,RDFState> state=sourceStateTransmitter.copyPropertiesTo(wrapper,currentState);
    mergedModel.merge(state.getPersistentState());
  }
  semanticDatabase.removeStatements(mergedModel.getDeleteStatements());
  semanticDatabase.addStatements(mergedModel.getCurrentStatements());
}

Fixed version (ground truth):
@Override public void write(Map<Object,RDFState> objectsAndState){
  RDFState mergedModel=new RDFState();
  for (  Entry<Object,RDFState> entry : objectsAndState.entrySet()) {
    Object source=entry.getKey();
    RDFState dbStatements=entry.getValue();
    final SemanticPersistentEntity<?> persistentEntity=mappingContext.getPersistentEntity(source.getClass());
    final BeanWrapper<Object> wrapper=BeanWrapper.<Object>create(source,conversionService);
    RDFState currentState=toStatementsConverter.convertEntityToStatements(persistentEntity,source);
    if (dbStatements != null && !dbStatements.isEmpty()) {
      dbStatements.getCurrentStatements().removeAll(currentState.getCurrentStatements());
      currentState.setDeleteStatements(dbStatements.getCurrentStatements());
    }
    EntityState<Object,RDFState> state=sourceStateTransmitter.copyPropertiesTo(wrapper,currentState);
    mergedModel.merge(state.getPersistentState());
  }
  semanticDatabase.removeStatements(mergedModel.getDeleteStatements());
  semanticDatabase.addStatements(mergedModel.getCurrentStatements());
}
Program: 147494
Project: 147494
Buggy source:
private void handleAssociation(SemanticPersistentProperty persistentProperty){
  String associationBinding=getObjectBinding(binding,persistentProperty);
  Object objectValue=propertyToValue.get(persistentProperty.getName());
  if (objectValue == null) {
    appendPattern(sb,binding,"String_Node_Str" + persistentProperty.getAliasPredicate() + "String_Node_Str",associationBinding);
    if (persistentProperty.getMappingPolicy().combineWith(globalMappingPolicy).shouldCascade(Cascade.GET)) {
      SemanticPersistentEntity<?> associatedPersistentEntity=mappingContext.getPersistentEntity(persistentProperty.getActualType());
      appendPattern(sb,associationBinding,"String_Node_Str","String_Node_Str" + associatedPersistentEntity.getRDFType() + "String_Node_Str");
      PropertiesToBindingsHandler associationHandler=new PropertiesToBindingsHandler(this.sb,associationBinding,new HashMap<String,Object>(),this.mappingContext,++this.depth,this.globalMappingPolicy);
      associatedPersistentEntity.doWithProperties(associationHandler);
      associatedPersistentEntity.doWithAssociations(associationHandler);
    }
  }
}

Fixed version (ground truth):
private void handleAssociation(SemanticPersistentProperty persistentProperty){
  String associationBinding=getObjectBinding(binding,persistentProperty);
  Object objectValue=propertyToValue.get(persistentProperty.getName());
  if (objectValue == null) {
    if (originalPredicates) {
      if (Direction.OUTGOING.equals(persistentProperty.getDirection())) {
        appendPattern(sb,binding,"String_Node_Str" + persistentProperty.getPredicate() + "String_Node_Str",associationBinding);
      }
 else       if (Direction.INCOMING.equals(persistentProperty.getDirection())) {
        appendPattern(sb,associationBinding,"String_Node_Str" + persistentProperty.getPredicate() + "String_Node_Str",binding);
      }
 else {
        appendPattern(sb,binding,"String_Node_Str" + persistentProperty.getPredicate() + "String_Node_Str",associationBinding);
        appendPattern(sb,associationBinding,"String_Node_Str" + persistentProperty.getPredicate() + "String_Node_Str",binding);
      }
    }
 else {
      appendPattern(sb,binding,"String_Node_Str" + persistentProperty.getAliasPredicate() + "String_Node_Str",associationBinding);
    }
    if (persistentProperty.getMappingPolicy().combineWith(globalMappingPolicy).shouldCascade(Cascade.GET)) {
      SemanticPersistentEntity<?> associatedPersistentEntity=mappingContext.getPersistentEntity(persistentProperty.getActualType());
      appendPattern(sb,associationBinding,"String_Node_Str","String_Node_Str" + associatedPersistentEntity.getRDFType() + "String_Node_Str");
      PropertiesToBindingsHandler associationHandler=new PropertiesToBindingsHandler(this.sb,associationBinding,new HashMap<String,Object>(),this.mappingContext,++this.depth,this.globalMappingPolicy,this.originalPredicates);
      associatedPersistentEntity.doWithProperties(associationHandler);
      associatedPersistentEntity.doWithAssociations(associationHandler);
    }
  }
}
Program: 147495
Project: 147495
Buggy source:
public PropertiesToBindingsHandler(StringBuilder sb,String binding,Map<String,Object> propertyToValue,SemanticMappingContext mappingContext,int depth,MappingPolicy globalMappingPolicy){
  super(mappingContext);
  this.sb=sb;
  this.binding=binding;
  this.propertyToValue=propertyToValue;
  this.objectToLiteralConverter=ObjectToLiteralConverter.getInstance();
  this.depth=depth;
  this.globalMappingPolicy=globalMappingPolicy;
}

Fixed version (ground truth):
public PropertiesToBindingsHandler(StringBuilder sb,String binding,Map<String,Object> propertyToValue,SemanticMappingContext mappingContext,int depth,MappingPolicy globalMappingPolicy,Boolean originalPredicates){
  super(mappingContext);
  this.sb=sb;
  this.binding=binding;
  this.propertyToValue=propertyToValue;
  this.objectToLiteralConverter=ObjectToLiteralConverter.getInstance();
  this.depth=depth;
  this.globalMappingPolicy=globalMappingPolicy;
  this.originalPredicates=originalPredicates;
}
Program: 147497
Project: 147497
Buggy source:
@Test public void TestBindingCreationEagerLoad(){
  String queryBindings=entityToQueryConverter.getPropertyBindings(collectionResource,testCollectionType,new HashMap<String,Object>(),MappingPolicyImpl.ALL_POLICY);
  String[] expected=expectedBindingsEager.replaceAll("String_Node_Str","String_Node_Str").split("String_Node_Str");
  String[] resultBindings=queryBindings.replaceAll("String_Node_Str","String_Node_Str").split("String_Node_Str");
  Arrays.sort(expected,comparator);
  Arrays.sort(resultBindings,comparator);
  assertArrayEquals(expected,resultBindings);
}

Fixed version (ground truth):
@Test public void TestBindingCreationEagerLoad(){
  String queryBindings=entityToQueryConverter.getPropertyBindings(collectionResource,testCollectionType,new HashMap<String,Object>(),MappingPolicyImpl.ALL_POLICY,false);
  String[] expected=expectedBindingsEager.replaceAll("String_Node_Str","String_Node_Str").split("String_Node_Str");
  String[] resultBindings=queryBindings.replaceAll("String_Node_Str","String_Node_Str").split("String_Node_Str");
  Arrays.sort(expected,comparator);
  Arrays.sort(resultBindings,comparator);
  assertArrayEquals(expected,resultBindings);
}
Program: 147498
Project: 147498
Buggy source:
@Test public void TestBindingCreation(){
  String queryBindings=entityToQueryConverter.getPropertyBindings(resource,testEntityType,new HashMap<String,Object>(),MappingPolicyImpl.ALL_POLICY);
  String[] expected=expectedBindings.replaceAll("String_Node_Str","String_Node_Str").split("String_Node_Str");
  String[] resultBindings=queryBindings.replaceAll("String_Node_Str","String_Node_Str").split("String_Node_Str");
  Arrays.sort(expected,comparator);
  Arrays.sort(resultBindings,comparator);
  assertArrayEquals(expected,resultBindings);
}

Fixed version (ground truth):
@Test public void TestBindingCreation(){
  String queryBindings=entityToQueryConverter.getPropertyBindings(resource,testEntityType,new HashMap<String,Object>(),MappingPolicyImpl.ALL_POLICY,false);
  String[] expected=expectedBindings.replaceAll("String_Node_Str","String_Node_Str").split("String_Node_Str");
  String[] resultBindings=queryBindings.replaceAll("String_Node_Str","String_Node_Str").split("String_Node_Str");
  Arrays.sort(expected,comparator);
  Arrays.sort(resultBindings,comparator);
  assertArrayEquals(expected,resultBindings);
}
Program: 147499
Project: 147499
Buggy source:
private Repository getRepository(){
  RepositoryConfig config=getConfig();
  if (StringUtils.hasText(username) && StringUtils.hasText(password)) {
    return SemanticDatabaseManager.getRepository(url,username,password,config);
  }
 else {
    return SemanticDatabaseManager.getRepository(url,config);
  }
}

Fixed version (ground truth):
private Repository getRepository(){
  if (StringUtils.hasText(username) && StringUtils.hasText(password)) {
    return SemanticDatabaseManager.getRepository(url,username,password,this.configFile);
  }
 else {
    return SemanticDatabaseManager.getRepository(url,this.configFile);
  }
}
Program: 147500
Project: 147500
Buggy source:
private static Repository createRepository(RepositoryManager manager,String repositoryId,RepositoryConfig config) throws RepositoryException, RepositoryConfigException {
  Repository repo;
  if (config == null) {
    log.info("String_Node_Str");
    try {
      config=getDefaultConfig();
    }
 catch (    Exception e) {
      log.error("String_Node_Str",e);
      return null;
    }
  }
  if (!(repositoryId == null || repositoryId.isEmpty())) {
    config.setID(repositoryId);
  }
  manager.addRepositoryConfig(config);
  repo=manager.getRepository(config.getID());
  repo.initialize();
  return repo;
}

Fixed version (ground truth):
private static Repository createRepository(RepositoryManager manager,String repositoryId,RepositoryConfig config) throws RepositoryException, RepositoryConfigException {
  Repository repo;
  if (config == null) {
    logger.info("String_Node_Str");
    try {
      config=getDefaultConfig();
    }
 catch (    Exception e) {
      logger.error("String_Node_Str",e);
      return null;
    }
  }
  if (!(repositoryId == null || repositoryId.isEmpty())) {
    config.setID(repositoryId);
  }
  manager.addRepositoryConfig(config);
  repo=manager.getRepository(config.getID());
  repo.initialize();
  return repo;
}
Program: 147501
Project: 147501
Buggy source:
private static RepositoryManager createNewLocalRepositoryManager(String baseDir) throws RepositoryException {
  log.info("String_Node_Str",baseDir);
  LocalRepositoryManager repoManager=new LocalRepositoryManager(new File(baseDir));
  repoManager.initialize();
  return repoManager;
}

Fixed version (ground truth):
private static RepositoryManager createNewLocalRepositoryManager(String baseDir) throws RepositoryException {
  logger.info("String_Node_Str",baseDir);
  LocalRepositoryManager repoManager=new LocalRepositoryManager(new File(baseDir));
  repoManager.initialize();
  return repoManager;
}
Program: 147502
Project: 147502
Buggy source:
public static Repository getRepository(String repoURL){
  String[] parts=parseRepositoryURL(repoURL);
  return getRepository(parts[0],parts[1]);
}

Fixed version (ground truth):
public static Repository getRepository(String repoURL,String username,String password,String configFile){
  String[] parts=parseRepositoryURL(repoURL);
  return getRepository(parts[0],parts[1],username,password,configFile);
}
Program: 147503
Project: 147503
Buggy source:
private static synchronized RepositoryManager getRepositoryManagerForLocation(String serverURL,String username,String password) throws RepositoryException {
  RepositoryManager repoManager;
  if ((repoManager=openRepositoryManagers.get(serverURL)) != null) {
    log.info("String_Node_Str",serverURL);
    return repoManager;
  }
  if (serverURL.startsWith("String_Node_Str")) {
    repoManager=createNewRemoteRepositoryManager(serverURL,username,password);
  }
 else {
    repoManager=createNewLocalRepositoryManager(serverURL);
  }
  if (repoManager != null) {
    openRepositoryManagers.put(serverURL,repoManager);
  }
  return repoManager;
}

Fixed version (ground truth):
private static synchronized RepositoryManager getRepositoryManagerForLocation(String serverURL,String username,String password) throws RepositoryException {
  RepositoryManager repoManager;
  if ((repoManager=openRepositoryManagers.get(serverURL)) != null) {
    logger.info("String_Node_Str",serverURL);
    return repoManager;
  }
  if (serverURL.startsWith("String_Node_Str")) {
    repoManager=createNewRemoteRepositoryManager(serverURL,username,password);
  }
 else {
    repoManager=createNewLocalRepositoryManager(serverURL);
  }
  if (repoManager != null) {
    openRepositoryManagers.put(serverURL,repoManager);
  }
  return repoManager;
}
Program: 147504
Project: 147504
Buggy source:
private static RepositoryManager createNewRemoteRepositoryManager(String serverURL,String username,String password) throws RepositoryException {
  log.info("String_Node_Str",serverURL);
  RemoteRepositoryManager repoManager=new RemoteRepositoryManager(serverURL);
  repoManager.setUsernameAndPassword(username,password);
  repoManager.initialize();
  return repoManager;
}

Fixed version (ground truth):
private static RepositoryManager createNewRemoteRepositoryManager(String serverURL,String username,String password) throws RepositoryException {
  logger.info("String_Node_Str",serverURL);
  RemoteRepositoryManager repoManager=new RemoteRepositoryManager(serverURL);
  repoManager.setUsernameAndPassword(username,password);
  repoManager.initialize();
  return repoManager;
}
Program: 147505
Project: 147505
Buggy source:
@BeforeClass public static void prepare(){
  ClassPathResource propsResource=new ClassPathResource("String_Node_Str");
  Properties props=new Properties();
  try {
    props.load(propsResource.getInputStream());
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
  url=props.getProperty("String_Node_Str","String_Node_Str");
  securedUrl=props.getProperty("String_Node_Str","String_Node_Str");
  username=props.getProperty("String_Node_Str","String_Node_Str");
  password=props.getProperty("String_Node_Str","String_Node_Str");
  localRepositoryBase=props.getProperty("String_Node_Str","String_Node_Str");
  newRepoID="String_Node_Str" + String.valueOf((int)Math.floor(Math.random() * 10000));
}

Fixed version (ground truth):
@BeforeClass public static void prepare(){
  ClassPathResource propsResource=new ClassPathResource("String_Node_Str");
  Properties props=new Properties();
  try {
    props.load(propsResource.getInputStream());
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
  localRepositoryBase=props.getProperty("String_Node_Str","String_Node_Str");
  newRepoID="String_Node_Str" + String.valueOf((int)Math.floor(Math.random() * 10000));
}
Program: 147506
Project: 147506
Buggy source:
@Test public void testOpenExistingLocalRepo(){
  try {
    Repository repo=SemanticDatabaseManager.getRepository(localRepositoryBase + "String_Node_Str" + Protocol.REPOSITORIES+ "String_Node_Str"+ newRepoID);
    assertTrue(testRepoSimple(repo));
  }
 catch (  Exception e) {
    e.printStackTrace();
    assertTrue(false);
  }
}

Fixed version (ground truth):
@Test public void testOpenExistingLocalRepo(){
  try {
    Repository repo=SemanticDatabaseManager.getRepository(localRepositoryBase + "String_Node_Str" + Protocol.REPOSITORIES+ "String_Node_Str"+ newRepoID,null);
    assertTrue(testRepoSimple(repo));
  }
 catch (  Exception e) {
    e.printStackTrace();
    assertTrue(false);
  }
}
Program: 147507
Project: 147507
Buggy source:
@Test public void testCreateLocalRepoWithDefaultConfigAndCustomID(){
  try {
    Repository repo=SemanticDatabaseManager.getRepository(localRepositoryBase,newRepoID);
    assertTrue(testRepoSimple(repo));
  }
 catch (  Exception e) {
    e.printStackTrace();
    assertTrue(false);
  }
}

Fixed version (ground truth):
@Test public void testCreateLocalRepoWithDefaultConfigAndCustomID(){
  try {
    Repository repo=SemanticDatabaseManager.getRepository(localRepositoryBase + "String_Node_Str" + Protocol.REPOSITORIES+ "String_Node_Str"+ newRepoID,null);
    assertTrue(testRepoSimple(repo));
  }
 catch (  Exception e) {
    e.printStackTrace();
    assertTrue(false);
  }
}
Program: 147508
Project: 147508
Buggy source:
private void sendEmail(Email mail){
}

Fixed version (ground truth):
private void sendEmail(Email mail){
  executorService.execute(() -> {
    try {
      Properties props=System.getProperties();
      Session session=Session.getInstance(props,null);
      Message mailMessage=new MimeMessage(session);
      mailMessage.setFrom(new InternetAddress(emailFromAddress));
      for (      User receiver : mail.getRecipients()) {
        if (receiver.getEMail() != null) {
          mailMessage.addRecipients(Message.RecipientType.BCC,InternetAddress.parse(receiver.getEMail(),false));
        }
      }
      mailMessage.setSubject(mail.getSubject());
      String text=mail.getStarting();
      text=text.concat("String_Node_Str");
      text=text.concat(mail.getMessage());
      text=text.concat("String_Node_Str");
      text=text.concat(mail.getClosing());
      text=text.concat("String_Node_Str");
      text=text.concat(mail.getFooter());
      mailMessage.setText(text);
      mailMessage.setHeader("String_Node_Str","String_Node_Str");
      mailMessage.setSentDate(mail.getCreationDate());
      Transport.send(mailMessage);
    }
 catch (    Exception ex) {
      logger.warning(ex.getMessage());
    }
  }
);
}
Program: 147519
Project: 147519
Buggy source:
public Comment(Builder builder){
  Id=builder.id;
  this.message=builder.message;
  this.creatorId=builder.userId;
  this.requirementId=builder.requirementId;
  this.creation_time=builder.creation_time;
}

Fixed version (ground truth):
public Comment(Builder builder){
  Id=builder.id;
  this.message=builder.message;
  this.creatorId=builder.userId;
  this.requirementId=builder.requirementId;
}
Program: 147520
Project: 147520
Buggy source:
/** 
 * Private constructor, should be called from its builder only.
 * @param builder
 */
private Component(Builder builder){
  this.id=builder.id;
  this.description=builder.description;
  this.name=builder.name;
  this.projectId=builder.projectId;
}

Fixed version (ground truth):
/** 
 * Private constructor, should be called from its builder only.
 * @param builder
 */
private Component(Builder builder){
  this.id=builder.id;
  this.description=builder.description;
  this.name=builder.name;
  this.projectId=builder.projectId;
  this.leaderId=builder.leaderId;
}
Program: 147521
Project: 147521
Buggy source:
public ProjectVisibility getVisibility(){
  return visibility;
}

Fixed version (ground truth):
public static ProjectVisibility getVisibility(final String visibilityChar){
  for (  ProjectVisibility vis : ProjectVisibility.values())   if (vis.asChar == visibilityChar)   return vis;
  return null;
}
Program: 147522
Project: 147522
Buggy source:
@Override public CommentsRecord createRecord(Comment entity){
  CommentsRecord record=new CommentsRecord();
  record.setId(entity.getId());
  record.setUserId(entity.getCreatorId());
  record.setMessage(entity.getMessage());
  record.setRequirementId(entity.getRequirementId());
  return record;
}

Fixed version (ground truth):
@Override public CommentsRecord createRecord(Comment entity){
  CommentsRecord record=new CommentsRecord();
  record.setId(entity.getId());
  record.setUserId(entity.getCreatorId());
  record.setMessage(entity.getMessage());
  record.setRequirementId(entity.getRequirementId());
  record.setCreationTime(new Timestamp(Calendar.getInstance().getTime().getTime()));
  return record;
}
Program: 147523
Project: 147523
Buggy source:
@Override public ComponentsRecord createRecord(Component entry){
  ComponentsRecord record=new ComponentsRecord();
  record.setDescription(entry.getDescription());
  record.setName(entry.getName());
  return record;
}

Fixed version (ground truth):
@Override public ComponentsRecord createRecord(Component entry){
  ComponentsRecord record=new ComponentsRecord();
  record.setDescription(entry.getDescription());
  record.setName(entry.getName());
  record.setProjectId(entry.getProjectId());
  record.setId(entry.getId());
  record.setLeaderId(entry.getLeaderId());
  return record;
}
Program: 147524
Project: 147524
Buggy source:
@Override public Component mapToEntity(ComponentsRecord record){
  return Component.getBuilder(record.getName()).description(record.getDescription()).id(record.getId()).build();
}

Fixed version (ground truth):
@Override public Component mapToEntity(ComponentsRecord record){
  return Component.getBuilder(record.getName()).description(record.getDescription()).projectId(record.getProjectId()).id(record.getId()).leaderId(record.getLeaderId()).build();
}
Program: 147525
Project: 147525
Buggy source:
@Override public ProjectsRecord createRecord(Project entry){
  ProjectsRecord record=new ProjectsRecord();
  record.setDescription(entry.getDescription());
  record.setName(entry.getName());
  return record;
}

Fixed version (ground truth):
@Override public ProjectsRecord createRecord(Project entry){
  ProjectsRecord record=new ProjectsRecord();
  record.setDescription(entry.getDescription());
  record.setName(entry.getName());
  record.setLeaderId(entry.getLeaderId());
  record.setVisibility(entry.getVisibility().asChar());
  return record;
}
Program: 147526
Project: 147526
Buggy source:
@Override public Project mapToEntity(ProjectsRecord record){
  return Project.getBuilder(record.getName()).description(record.getDescription()).id(record.getId()).build();
}

Fixed version (ground truth):
@Override public Project mapToEntity(ProjectsRecord record){
  return Project.getBuilder(record.getName()).description(record.getDescription()).id(record.getId()).leaderId(record.getLeaderId()).visibility(Project.ProjectVisibility.getVisibility(record.getVisibility())).build();
}
Program: 147527
Project: 147527
Buggy source:
public void testCreateComponent() throws Exception {
  int createdComponentId=9;
  Component testComp9=Component.getBuilder("String_Node_Str").description("String_Node_Str").id(createdComponentId).projectId(1).build();
  facade.createComponent(testComp9);
  List<Component> components=facade.listComponentsByProjectId(1,ALL_IN_ONE_PAGE);
  assertNotNull(components);
  assertEquals(1,components.size());
  assertEquals(createdComponentId,components.get(0).getId());
  jooq.delete(Components.COMPONENTS).where(Components.COMPONENTS.ID.equal(createdComponentId)).execute();
}

Fixed version (ground truth):
public void testCreateComponent() throws Exception {
  int createdComponentId=9;
  Component testComp9=Component.getBuilder("String_Node_Str").description("String_Node_Str").id(createdComponentId).projectId(1).leaderId(1).build();
  facade.createComponent(testComp9);
  List<Component> components=facade.listComponentsByProjectId(1,ALL_IN_ONE_PAGE);
  assertNotNull(components);
  assertEquals(1,components.size());
  assertEquals(createdComponentId,components.get(0).getId());
  jooq.delete(Components.COMPONENTS).where(Components.COMPONENTS.ID.equal(createdComponentId)).execute();
}
Program: 147530
Project: 147530
Buggy source:
@RequestMapping(value="String_Node_Str",method=RequestMethod.POST) public String orderAddTicket(@ModelAttribute(value="String_Node_Str") int row,@ModelAttribute(value="String_Node_Str") Sector sector,@RequestParam(value="String_Node_Str") int seat,Model model){
  Ticket ticket=new Ticket();
  ticket.setSector(sector);
  ticket.setRow(row);
  ticket.setSeat(seat);
  currentSeat=seat;
  if (order.size() > 0) {
    for (    Ticket ord : order) {
      if (ord.getSector().equals(sector) && ord.getSeat() == seat && ord.getRow() == row)       return "String_Node_Str";
    }
  }
  ticket.setId(currentOrderId++);
  order.add(ticket);
  orderPrice+=sector.getPrice();
  model.addAttribute("String_Node_Str","String_Node_Str");
  return "String_Node_Str";
}

Fixed version (ground truth):
@RequestMapping(value="String_Node_Str",method=RequestMethod.POST) public String orderAddTicket(@ModelAttribute(value="String_Node_Str") int row,@ModelAttribute(value="String_Node_Str") Sector sector,@RequestParam(value="String_Node_Str") int seat[],Model model){
  for (  int seat1 : seat) {
    Ticket ticket=new Ticket();
    ticket.setSector(sector);
    ticket.setRow(row);
    ticket.setSeat(seat1);
    currentSeat=seat1;
    if (order.size() > 0) {
      for (      Ticket ord : order) {
        if (ord.getSector().equals(sector) && ord.getSeat() == seat1 && ord.getRow() == row)         return "String_Node_Str";
      }
    }
    ticket.setId(currentOrderId++);
    order.add(ticket);
    orderPrice+=sector.getPrice();
  }
  if (seat.length == 1)   model.addAttribute("String_Node_Str","String_Node_Str");
  if (seat.length > 1)   model.addAttribute("String_Node_Str","String_Node_Str");
  return "String_Node_Str";
}
Program: 147531
Project: 147531
Buggy source:
public List<String> getLegenda(List<Sector> sector){
  List<Double> sortByPrice=new ArrayList<>();
  List<String> legenda=new ArrayList<>();
  StringBuilder buf=new StringBuilder(100);
  int index;
  sortByPrice.add(0,sector.get(0).getPrice());
  for (int i=1; i < sector.size(); i++) {
    if (sector.get(i).getPrice() > sector.get(i - 1).getPrice())     sortByPrice.add(sector.get(i).getPrice());
  }
  for (int j=0; j < sortByPrice.size(); j++) {
    buf.append(sortByPrice.get(j)).append("String_Node_Str");
    index=0;
    for (    Sector sector2 : sector) {
      if ((double)sector2.getPrice() == sortByPrice.get(j)) {
        if (index == 0)         buf.append(sector2.getName());
        if (index > 0)         buf.append("String_Node_Str").append(sector2.getName());
        index++;
      }
    }
    legenda.add(j,buf.toString());
    buf.delete(0,99);
  }
  return legenda;
}

Fixed version (ground truth):
public List<String> getLegenda(List<Sector> sector){
  List<Double> sortByPrice=new ArrayList<>();
  List<String> legenda=new ArrayList<>();
  StringBuilder buf=new StringBuilder(200);
  int index;
  sortByPrice.add(0,sector.get(0).getPrice());
  for (int i=1; i < sector.size(); i++) {
    if (sector.get(i).getPrice() > sector.get(i - 1).getPrice())     sortByPrice.add(sector.get(i).getPrice());
  }
  for (int j=0; j < sortByPrice.size(); j++) {
    buf.append(sortByPrice.get(j)).append("String_Node_Str");
    index=0;
    for (    Sector sector2 : sector) {
      if ((double)sector2.getPrice() == sortByPrice.get(j)) {
        if (index == 0)         buf.append(sector2.getName());
        if (index > 0)         buf.append("String_Node_Str").append(sector2.getName());
        index++;
      }
    }
    legenda.add(j,buf.toString());
    buf.delete(0,199);
  }
  return legenda;
}
Program: 147533
Project: 147533
Buggy source:
@RequestMapping(value="String_Node_Str",method=RequestMethod.POST) public String operatorAdd(@RequestParam("String_Node_Str") String name,@RequestParam("String_Node_Str") String surname,@RequestParam("String_Node_Str") String login,@RequestParam("String_Node_Str") String password,@RequestParam("String_Node_Str") String passwordRepeat,@RequestParam("String_Node_Str") String description,Model model){
  if (login.length() < 3) {
    model.addAttribute("String_Node_Str","String_Node_Str");
    return "String_Node_Str";
  }
  if (password.length() < 6) {
    model.addAttribute("String_Node_Str","String_Node_Str");
    return "String_Node_Str";
  }
  if (!password.equals(passwordRepeat)) {
    model.addAttribute("String_Node_Str","String_Node_Str");
    return "String_Node_Str";
  }
  Operator operator=new Operator();
  operator.setName(name);
  operator.setSurname(surname);
  operator.setLogin(login);
  operator.setPassword(password);
  operator.setDescription(description);
  List<Operator> operators=operatorService.getAllOperators();
  for (  Operator oper : operators) {
    if (oper.getLogin().equals(operator.getLogin())) {
      model.addAttribute("String_Node_Str","String_Node_Str");
      return "String_Node_Str";
    }
  }
  operatorService.addOperator(operator);
  return "String_Node_Str";
}

Fixed version (ground truth):
@RequestMapping(value="String_Node_Str",method=RequestMethod.POST) public String operatorAdd(@RequestParam("String_Node_Str") String name,@RequestParam("String_Node_Str") String surname,@RequestParam("String_Node_Str") String login,@RequestParam("String_Node_Str") String password,@RequestParam("String_Node_Str") String passwordRepeat,@RequestParam("String_Node_Str") String description,Model model){
  if (!password.equals(passwordRepeat)) {
    model.addAttribute("String_Node_Str","String_Node_Str");
    return "String_Node_Str";
  }
  Operator operator=new Operator();
  operator.setName(name);
  operator.setSurname(surname);
  operator.setLogin(login);
  operator.setPassword(password);
  operator.setDescription(description);
  List<Operator> operators=operatorService.getAllOperators();
  for (  Operator oper : operators) {
    if (oper.getLogin().equals(operator.getLogin())) {
      model.addAttribute("String_Node_Str","String_Node_Str");
      return "String_Node_Str";
    }
  }
  operatorService.addOperator(operator);
  return "String_Node_Str";
}
Program: 147534
Project: 147534
Buggy source:
private static Response makeURLConnectionRequest(RequestMethod method,String url,String params,String data) throws APIConnectionException, IOException {
  CloseableHttpResponse response=null;
  try {
switch (method) {
case GET:
      response=createGetConnection(url,params);
    break;
case PUT:
  response=createPutConnection(url,params);
break;
case POST:
response=createPostConnection(url,params,data);
break;
case DELETE:
response=createDeleteConnection(url,params);
break;
default :
throw new APIConnectionException(String.format("String_Node_Str",method));
}
HttpEntity entity=response.getEntity();
String responseBody=null;
int statusCode=response.getStatusLine().getStatusCode();
Header[] headers;
if (statusCode >= 200 && statusCode < 300) {
responseBody=getResponseBody(entity.getContent());
}
 else if (entity.getContent() != null) {
responseBody=getResponseBody(entity.getContent());
}
headers=response.getAllHeaders();
String responseMessage=EntityUtils.toString(entity);
return new Response(statusCode,responseBody,responseMessage,headers);
}
 catch (IOException e) {
throw new APIConnectionException(String.format("String_Node_Str",MAIN_HOST),e);
}
 finally {
if (response != null) {
response.close();
}
}
}

Fixed version (ground truth):
private static Response makeURLConnectionRequest(RequestMethod method,String url,String params,String data) throws APIConnectionException, IOException {
  CloseableHttpResponse response=null;
  try {
switch (method) {
case GET:
      response=createGetConnection(url,params);
    break;
case PUT:
  response=createPutConnection(url,params);
break;
case POST:
response=createPostConnection(url,params,data);
break;
case DELETE:
response=createDeleteConnection(url,params);
break;
default :
throw new APIConnectionException(String.format("String_Node_Str",method));
}
HttpEntity entity=response.getEntity();
String responseBody=null;
int statusCode=response.getStatusLine().getStatusCode();
Header[] headers;
if (statusCode >= 200 && statusCode < 300) {
responseBody=getResponseBody(entity.getContent());
}
 else if (entity.getContent() != null) {
responseBody=getResponseBody(entity.getContent());
}
headers=response.getAllHeaders();
String responseMessage="String_Node_Str";
return new Response(statusCode,responseBody,responseMessage,headers);
}
 catch (IOException e) {
throw new APIConnectionException(String.format("String_Node_Str",MAIN_HOST),e);
}
 finally {
if (response != null) {
response.close();
}
}
}
Program: 147535
Project: 147535
Buggy source:
/** 
 * @param state the state to set
 */
public void setState(int state){
  this.state=state;
}

Fixed version (ground truth):
/** 
 * @param state the state to set
 */
public void setState(Number state){
  this.state=state;
}