nus-yam/ex-repair huggingface dataset:
Program: 18133
Project: 18133
Buggy source:
private void handleFunctionImport(final EdmFunctionImport functionImport,final String emptyParentheses,final String keyPredicate) throws UriParserException, EdmException {
  final EdmTyped returnType=functionImport.getReturnType();
  final EdmType type=returnType.getType();
  final boolean isCollection=returnType.getMultiplicity() == EdmMultiplicity.MANY;
  if (type.getKind() == EdmTypeKind.ENTITY && isCollection) {
    handleEntitySet(functionImport.getEntitySet(),keyPredicate);
    return;
  }
  if (emptyParentheses != null)   throw new UriParserException("String_Node_Str");
  this.uriResult.setTargetType(type);
switch (type.getKind()) {
case SIMPLE:
    uriResult.setUriType(isCollection ? UriType.URI13 : UriType.URI14);
  break;
case COMPLEX:
uriResult.setUriType(isCollection ? UriType.URI11 : UriType.URI12);
break;
case ENTITY:
uriResult.setUriType(UriType.URI10);
break;
default :
throw new UriParserException("String_Node_Str" + currentPathSegment + "String_Node_Str"+ pathSegments);
}
if (!this.pathSegments.isEmpty()) if (this.uriResult.getUriType() == UriType.URI14) {
currentPathSegment=pathSegments.remove(0).getPath();
if ("String_Node_Str".equals(currentPathSegment)) uriResult.setValue(true);
 else throw new UriParserException("String_Node_Str" + currentPathSegment);
}
if (!pathSegments.isEmpty()) throw new UriParserException("String_Node_Str" + currentPathSegment + "String_Node_Str"+ this.pathSegments);
}

Fixed version (ground truth):
private void handleFunctionImport(final EdmFunctionImport functionImport,final String emptyParentheses,final String keyPredicate) throws UriParserException, EdmException {
  final EdmTyped returnType=functionImport.getReturnType();
  final EdmType type=returnType.getType();
  final boolean isCollection=returnType.getMultiplicity() == EdmMultiplicity.MANY;
  if (type.getKind() == EdmTypeKind.ENTITY && isCollection) {
    handleEntitySet(functionImport.getEntitySet(),keyPredicate);
    return;
  }
  if (emptyParentheses != null)   throw new UriParserException("String_Node_Str");
  uriResult.setTargetType(type);
switch (type.getKind()) {
case SIMPLE:
    uriResult.setUriType(isCollection ? UriType.URI13 : UriType.URI14);
  break;
case COMPLEX:
uriResult.setUriType(isCollection ? UriType.URI11 : UriType.URI12);
break;
case ENTITY:
uriResult.setUriType(UriType.URI10);
break;
default :
throw new UriParserException("String_Node_Str" + currentPathSegment + "String_Node_Str"+ pathSegments);
}
if (!pathSegments.isEmpty()) if (uriResult.getUriType() == UriType.URI14) {
currentPathSegment=pathSegments.remove(0).getPath();
if ("String_Node_Str".equals(currentPathSegment)) uriResult.setValue(true);
 else throw new UriParserException("String_Node_Str" + currentPathSegment);
}
ensureLastSegment();
}
Program: 18134
Project: 18134
Buggy source:
private void handleEntitySet(final EdmEntitySet entitySet,final String keyPredicate) throws UriParserException, EdmException {
  final EdmEntityType entityType=entitySet.getEntityType();
  this.uriResult.setTargetType(entityType);
  this.uriResult.setTargetEntitySet(entitySet);
  if (keyPredicate == null) {
    if (this.pathSegments.isEmpty()) {
      this.uriResult.setUriType(UriType.URI1);
    }
 else {
      currentPathSegment=pathSegments.remove(0).getPath();
      checkCount();
      if (uriResult.isCount())       uriResult.setUriType(UriType.URI15);
 else       throw new UriParserException("String_Node_Str" + currentPathSegment + "String_Node_Str"+ this.pathSegments);
    }
  }
 else {
    this.uriResult.setKeyPredicates(this.parseKey(keyPredicate,entityType));
    if (this.pathSegments.isEmpty())     this.uriResult.setUriType(UriType.URI2);
 else     handleNavigationPathOptions();
  }
}

Fixed version (ground truth):
private void handleEntitySet(final EdmEntitySet entitySet,final String keyPredicate) throws UriParserException, EdmException {
  final EdmEntityType entityType=entitySet.getEntityType();
  uriResult.setTargetType(entityType);
  uriResult.setTargetEntitySet(entitySet);
  if (keyPredicate == null) {
    if (pathSegments.isEmpty()) {
      uriResult.setUriType(UriType.URI1);
    }
 else {
      currentPathSegment=pathSegments.remove(0).getPath();
      checkCount();
      if (uriResult.isCount())       uriResult.setUriType(UriType.URI15);
 else       throw new UriParserException("String_Node_Str" + currentPathSegment + "String_Node_Str"+ this.pathSegments);
    }
  }
 else {
    uriResult.setKeyPredicates(parseKey(keyPredicate,entityType));
    if (pathSegments.isEmpty())     uriResult.setUriType(UriType.URI2);
 else     handleNavigationPathOptions();
  }
}
Program: 18136
Project: 18136
Buggy source:
private void handlePropertyPath(final EdmProperty property) throws UriParserException, EdmException {
  this.uriResult.addProperty(property);
  final EdmType type=property.getType();
  if (pathSegments.isEmpty()) {
    if (type.getKind() == EdmTypeKind.SIMPLE)     if (this.uriResult.getPropertyPath().size() == 1)     this.uriResult.setUriType(UriType.URI5);
 else     this.uriResult.setUriType(UriType.URI4);
 else     if (type.getKind() == EdmTypeKind.COMPLEX)     this.uriResult.setUriType(UriType.URI3);
 else     throw new UriParserException("String_Node_Str" + currentPathSegment + "String_Node_Str"+ pathSegments);
    this.uriResult.setTargetType(type);
  }
 else {
    currentPathSegment=pathSegments.remove(0).getPath();
switch (type.getKind()) {
case SIMPLE:
      if ("String_Node_Str".equals(currentPathSegment))       if (this.pathSegments.isEmpty()) {
        this.uriResult.setValue(true);
        if (this.uriResult.getPropertyPath().size() == 1)         this.uriResult.setUriType(UriType.URI5);
 else         this.uriResult.setUriType(UriType.URI4);
      }
 else {
        throw new UriParserException("String_Node_Str");
      }
 else       throw new UriParserException("String_Node_Str" + currentPathSegment + "String_Node_Str"+ this.pathSegments);
    this.uriResult.setTargetType(type);
  break;
case COMPLEX:
final EdmProperty nextProperty=(EdmProperty)((EdmComplexType)type).getProperty(currentPathSegment);
handlePropertyPath(nextProperty);
break;
default :
throw new UriParserException("String_Node_Str" + currentPathSegment + "String_Node_Str"+ pathSegments);
}
}
}

Fixed version (ground truth):
private void handlePropertyPath(final EdmProperty property) throws UriParserException, EdmException {
  this.uriResult.addProperty(property);
  final EdmType type=property.getType();
  if (pathSegments.isEmpty()) {
    if (type.getKind() == EdmTypeKind.SIMPLE)     if (this.uriResult.getPropertyPath().size() == 1)     this.uriResult.setUriType(UriType.URI5);
 else     this.uriResult.setUriType(UriType.URI4);
 else     if (type.getKind() == EdmTypeKind.COMPLEX)     this.uriResult.setUriType(UriType.URI3);
 else     throw new UriParserException("String_Node_Str" + currentPathSegment + "String_Node_Str"+ pathSegments);
    this.uriResult.setTargetType(type);
  }
 else {
    currentPathSegment=pathSegments.remove(0).getPath();
switch (type.getKind()) {
case SIMPLE:
      if ("String_Node_Str".equals(currentPathSegment)) {
        ensureLastSegment();
        uriResult.setValue(true);
        if (uriResult.getPropertyPath().size() == 1)         uriResult.setUriType(UriType.URI5);
 else         uriResult.setUriType(UriType.URI4);
      }
 else {
        throw new UriParserException("String_Node_Str" + currentPathSegment + "String_Node_Str"+ this.pathSegments);
      }
    uriResult.setTargetType(type);
  break;
case COMPLEX:
final EdmProperty nextProperty=(EdmProperty)((EdmComplexType)type).getProperty(currentPathSegment);
handlePropertyPath(nextProperty);
break;
default :
throw new UriParserException("String_Node_Str" + currentPathSegment + "String_Node_Str"+ pathSegments);
}
}
}
Program: 18137
Project: 18137
Buggy source:
/** 
 * Parse the URI part after an OData service root, already splitted into path segments and query parameters.
 * @param pathSegments  the segments of the resource path, already unescaped
 * @param queryParameters  the query parameters, already unescaped
 * @return a {@link UriParserResult} instance containing the parsed information
 * @throws UriParserException
 */
public UriParserResult parse(final List<PathSegment> pathSegments,final Map<String,String> queryParameters) throws UriParserException {
  this.pathSegments=pathSegments;
  systemQueryOptions=new HashMap<SystemQueryOption,String>();
  otherQueryParameters=new HashMap<String,String>();
  uriResult=new UriParserResult();
  preparePathSegments();
  try {
    handleResourcePath();
    distributeQueryParameters(queryParameters);
    checkSystemQueryOptionsCompatibility();
    handleSystemQueryOptions();
    handleFunctionImportParameters();
  }
 catch (  EdmException e) {
    throw new UriParserException("String_Node_Str",e);
  }
  uriResult.setCustomQueryOptions(otherQueryParameters);
  UriParser.LOG.debug(uriResult.toString());
  return uriResult;
}

Fixed version (ground truth):
/** 
 * Parse the URI part after an OData service root, already splitted into path segments and query parameters.
 * @param pathSegments  the {@link PathSegment}s of the resource path, already unescaped
 * @param queryParameters  the query parameters, already unescaped
 * @return a {@link UriParserResult} instance containing the parsed information
 * @throws UriParserException
 */
public UriParserResult parse(final List<PathSegment> pathSegments,final Map<String,String> queryParameters) throws UriParserException {
  this.pathSegments=pathSegments;
  systemQueryOptions=new HashMap<SystemQueryOption,String>();
  otherQueryParameters=new HashMap<String,String>();
  uriResult=new UriParserResult();
  preparePathSegments();
  try {
    handleResourcePath();
    distributeQueryParameters(queryParameters);
    checkSystemQueryOptionsCompatibility();
    handleSystemQueryOptions();
    handleFunctionImportParameters();
  }
 catch (  EdmException e) {
    throw new UriParserException("String_Node_Str",e);
  }
  uriResult.setCustomQueryOptions(otherQueryParameters);
  UriParser.LOG.debug(uriResult.toString());
  return uriResult;
}
Program: 18138
Project: 18138
Buggy source:
private void handleNavigationPathOptions() throws UriParserException, EdmException {
  currentPathSegment=pathSegments.remove(0).getPath();
  checkCount();
  if (uriResult.isCount()) {
    uriResult.setUriType(UriType.URI16);
  }
 else   if ("String_Node_Str".equals(currentPathSegment)) {
    if (uriResult.getTargetEntitySet().getEntityType().hasStream())     if (this.pathSegments.isEmpty()) {
      this.uriResult.setUriType(UriType.URI17);
      this.uriResult.setValue(true);
    }
 else {
      throw new UriParserException("String_Node_Str" + currentPathSegment + "String_Node_Str"+ this.pathSegments);
    }
 else     throw new UriParserException("String_Node_Str");
  }
 else   if ("String_Node_Str".equals(currentPathSegment)) {
    this.uriResult.setLinks(true);
    if (pathSegments.isEmpty())     throw new UriParserException("String_Node_Str");
    currentPathSegment=pathSegments.remove(0).getPath();
    handleNavigationProperties();
  }
 else {
    handleNavigationProperties();
  }
}

Fixed version (ground truth):
private void handleNavigationPathOptions() throws UriParserException, EdmException {
  currentPathSegment=pathSegments.remove(0).getPath();
  checkCount();
  if (uriResult.isCount()) {
    uriResult.setUriType(UriType.URI16);
  }
 else   if ("String_Node_Str".equals(currentPathSegment)) {
    if (uriResult.getTargetEntitySet().getEntityType().hasStream()) {
      ensureLastSegment();
      uriResult.setUriType(UriType.URI17);
      uriResult.setValue(true);
    }
 else     throw new UriParserException("String_Node_Str");
  }
 else   if ("String_Node_Str".equals(currentPathSegment)) {
    this.uriResult.setLinks(true);
    if (pathSegments.isEmpty())     throw new UriParserException("String_Node_Str");
    currentPathSegment=pathSegments.remove(0).getPath();
    handleNavigationProperties();
  }
 else {
    handleNavigationProperties();
  }
}
Program: 18139
Project: 18139
Buggy source:
private void handleResourcePath() throws UriParserException, EdmException {
  UriParser.LOG.debug("String_Node_Str" + pathSegments);
  if (pathSegments.isEmpty()) {
    uriResult.setUriType(UriType.URI0);
    return;
  }
  currentPathSegment=pathSegments.remove(0).getPath();
  if ("String_Node_Str".equals(currentPathSegment))   if (this.pathSegments.isEmpty())   uriResult.setUriType(UriType.URI8);
 else   throw new UriParserException("String_Node_Str" + this.pathSegments);
 else   if ("String_Node_Str".equals(currentPathSegment))   if (this.pathSegments.isEmpty())   uriResult.setUriType(UriType.URI9);
 else   throw new UriParserException("String_Node_Str" + this.pathSegments);
 else   handleNormalInitialSegment();
}

Fixed version (ground truth):
private void handleResourcePath() throws UriParserException, EdmException {
  UriParser.LOG.debug("String_Node_Str" + pathSegments);
  if (pathSegments.isEmpty()) {
    uriResult.setUriType(UriType.URI0);
  }
 else {
    currentPathSegment=pathSegments.remove(0).getPath();
    if ("String_Node_Str".equals(currentPathSegment)) {
      ensureLastSegment();
      uriResult.setUriType(UriType.URI8);
    }
 else     if ("String_Node_Str".equals(currentPathSegment)) {
      ensureLastSegment();
      uriResult.setUriType(UriType.URI9);
    }
 else {
      handleNormalInitialSegment();
    }
  }
}
Program: 18140
Project: 18140
Buggy source:
private void checkQueryParameterCompatibility() throws UriParserException {
  UriParser.LOG.debug("String_Node_Str" + odataQueryParameters);
  UriType uriType=uriResult.getUriType();
  for (  SystemQueryOption queryOption : odataQueryParameters.keySet()) {
    if (!uriType.isCompatible(queryOption))     throw new UriParserException("String_Node_Str" + queryOption + "String_Node_Str"+ uriType);
  }
}

Fixed version (ground truth):
private void checkQueryParameterCompatibility() throws UriParserException {
  UriType uriType=uriResult.getUriType();
  for (  SystemQueryOption queryOption : odataQueryParameters.keySet()) {
    if (uriType == UriType.URI4 && queryOption == SystemQueryOption.$format && uriResult.isValue() == true)     throw new UriParserException("String_Node_Str" + queryOption + "String_Node_Str"+ uriType);
    if (uriType == UriType.URI5 && queryOption == SystemQueryOption.$format && uriResult.isValue() == true)     throw new UriParserException("String_Node_Str" + queryOption + "String_Node_Str"+ uriType);
    if (!uriType.isCompatible(queryOption))     throw new UriParserException("String_Node_Str" + queryOption + "String_Node_Str"+ uriType);
  }
}
Program: 18141
Project: 18141
Buggy source:
private void handleSystemQueryOptionInlineCount(final String inlineCount) throws UriParserException {
  if ("String_Node_Str".equals(inlineCount))   uriResult.setInlineCount(InlineCount.ALLPAGES);
 else   if ("String_Node_Str".equals(inlineCount))   uriResult.setInlineCount(InlineCount.NONE);
 else   if (inlineCount != null)   throw new UriParserException("String_Node_Str" + inlineCount + "String_Node_Str");
}

Fixed version (ground truth):
private void handleSystemQueryOptionInlineCount(final String inlineCount) throws UriParserException {
  if ("String_Node_Str".equals(inlineCount))   uriResult.setInlineCount(InlineCount.ALLPAGES);
 else   if ("String_Node_Str".equals(inlineCount))   uriResult.setInlineCount(InlineCount.NONE);
 else   throw new UriParserException("String_Node_Str" + inlineCount + "String_Node_Str");
}
Program: 18142
Project: 18142
Buggy source:
private void handleSystemQueryOptionSkip(final String skip) throws UriParserException {
  if (skip != null) {
    try {
      uriResult.setSkip(Integer.valueOf(skip));
    }
 catch (    NumberFormatException e) {
      throw new UriParserException("String_Node_Str" + skip + "String_Node_Str",e);
    }
    if (uriResult.getSkip() < 0)     throw new UriParserException("String_Node_Str");
  }
}

Fixed version (ground truth):
private void handleSystemQueryOptionSkip(final String skip) throws UriParserException {
  try {
    uriResult.setSkip(Integer.valueOf(skip));
  }
 catch (  NumberFormatException e) {
    throw new UriParserException("String_Node_Str" + skip + "String_Node_Str",e);
  }
  if (uriResult.getSkip() < 0)   throw new UriParserException("String_Node_Str");
}
Program: 18143
Project: 18143
Buggy source:
public UriParserResult parse(final List<PathSegment> pathSegments,Map<String,String> queryParameters) throws UriParserException {
  UriParser.LOG.debug(pathSegments.toString());
  this.uriResult=new UriParserResult();
  this.pathSegments=pathSegments;
  handleResourcePath();
  this.odataQueryParameters=new HashMap<SystemQueryOption,String>();
  this.otherQueryParameters=new HashMap<String,String>();
  for (  String queryOptionString : queryParameters.keySet()) {
    try {
      if (queryOptionString.startsWith("String_Node_Str")) {
        SystemQueryOption queryOption=SystemQueryOption.valueOf(queryOptionString);
        this.odataQueryParameters.put(queryOption,queryParameters.get(queryOptionString));
      }
 else {
        otherQueryParameters.put(queryOptionString,queryParameters.get(queryOptionString));
      }
    }
 catch (    IllegalArgumentException e) {
      throw new UriParserException("String_Node_Str" + queryOptionString);
    }
  }
  checkQueryParameterCompatibility();
  handleQueryParameters();
  return uriResult;
}

Fixed version (ground truth):
public UriParserResult parse(final List<PathSegment> pathSegments,Map<String,String> queryParameters) throws UriParserException {
  UriParser.LOG.debug(pathSegments.toString());
  this.uriResult=new UriParserResult();
  this.pathSegments=pathSegments;
  handleResourcePath();
  this.odataQueryParameters=new HashMap<SystemQueryOption,String>();
  this.otherQueryParameters=new HashMap<String,String>();
  UriParser.LOG.debug("String_Node_Str" + queryParameters);
  for (  String queryOptionString : queryParameters.keySet()) {
    try {
      if (queryOptionString.startsWith("String_Node_Str")) {
        SystemQueryOption queryOption=SystemQueryOption.valueOf(queryOptionString);
        this.odataQueryParameters.put(queryOption,queryParameters.get(queryOptionString));
      }
 else {
        otherQueryParameters.put(queryOptionString,queryParameters.get(queryOptionString));
      }
    }
 catch (    IllegalArgumentException e) {
      throw new UriParserException("String_Node_Str" + queryOptionString);
    }
  }
  checkQueryParameterCompatibility();
  handleQueryParameters();
  return uriResult;
}
Program: 18144
Project: 18144
Buggy source:
private void handleSystemQueryOptionTop(final String top) throws UriParserException {
  if (top != null) {
    try {
      uriResult.setTop(Integer.valueOf(top));
    }
 catch (    NumberFormatException e) {
      throw new UriParserException("String_Node_Str" + top + "String_Node_Str",e);
    }
    if (uriResult.getTop() < 0)     throw new UriParserException("String_Node_Str");
  }
}

Fixed version (ground truth):
private void handleSystemQueryOptionTop(final String top) throws UriParserException {
  try {
    uriResult.setTop(Integer.valueOf(top));
  }
 catch (  NumberFormatException e) {
    throw new UriParserException("String_Node_Str" + top + "String_Node_Str",e);
  }
  if (uriResult.getTop() < 0)   throw new UriParserException("String_Node_Str");
}
Program: 18145
Project: 18145
Buggy source:
private void handleSystemQueryOptionFormat(final String format) throws UriParserException {
  if ("String_Node_Str".equals(format))   uriResult.setFormat(Format.ATOM);
 else   if ("String_Node_Str".equals(format))   uriResult.setFormat(Format.JSON);
 else   if ("String_Node_Str".equals(format))   uriResult.setFormat(Format.XML);
 else   if ("String_Node_Str".equals(format))   throw new UriParserException("String_Node_Str");
}

Fixed version (ground truth):
private void handleSystemQueryOptionFormat(final String format) throws UriParserException {
  if ("String_Node_Str".equals(format))   uriResult.setFormat(Format.ATOM);
 else   if ("String_Node_Str".equals(format))   uriResult.setFormat(Format.JSON);
 else   if ("String_Node_Str".equals(format))   uriResult.setFormat(Format.XML);
 else   throw new UriParserException("String_Node_Str" + format + "String_Node_Str");
}
Program: 18147
Project: 18147
Buggy source:
@Test public void parseInCompatibleSystemQueryOptions() throws Exception {
  parseWrongUri("String_Node_Str");
  parseWrongUri("String_Node_Str");
}

Fixed version (ground truth):
@Test public void parseInCompatibleSystemQueryOptions() throws Exception {
  parseWrongUri("String_Node_Str");
  parseWrongUri("String_Node_Str");
  parseWrongUri("String_Node_Str");
  parseWrongUri("String_Node_Str");
  parseWrongUri("String_Node_Str");
  parseWrongUri("String_Node_Str");
}
Program: 18148
Project: 18148
Buggy source:
/** 
 * Get service for configured key provider <p> This method gets an auth key and so it blocks and shouldn't be called on the main thread.
 * @return bootstrap service
 * @throws IOException
 * @throws AccountsException
 */
public BootstrapService getService(Activity activity) throws IOException, AccountsException {
  return new BootstrapService(keyProvider.getAuthKey(),userAgentProvider);
}

Fixed version (ground truth):
/** 
 * Get service for configured key provider <p> This method gets an auth key and so it blocks and shouldn't be called on the main thread.
 * @return bootstrap service
 * @throws IOException
 * @throws AccountsException
 */
public BootstrapService getService(Activity activity) throws IOException, AccountsException {
  return new BootstrapService(keyProvider.getAuthKey(activity),userAgentProvider);
}
Program: 18149
Project: 18149
Buggy source:
@Override public void notifyNewActiveMember(final ClusterMember member,final List<ClusterMember> members){
  Runnable task=new Runnable(){
    @Override public void run(){
      for (      ClusterEventListener listener : listeners) {
        listener.onNewInactiveMember(member,members);
      }
    }
  }
;
  eventListenersExecutorService.execute(task);
}

Fixed version (ground truth):
@Override public void notifyNewActiveMember(final ClusterMember member,final List<ClusterMember> members){
  Runnable task=new Runnable(){
    @Override public void run(){
      for (      ClusterEventListener listener : listeners) {
        listener.onNewActiveMember(member,members);
      }
    }
  }
;
  eventListenersExecutorService.execute(task);
}
Program: 18150
Project: 18150
Buggy source:
private GossipMessage generateMessage(ClusterMember to){
  GossipMessage reply=new GossipMessage(clusterId,memberId,to.getId());
  List<GossipClusterMember> members=new ArrayList<GossipClusterMember>(activeMembers.values());
  GossipClusterMember me=new GossipClusterMember(memberId,host,port,System.currentTimeMillis(),clusterStateHash);
  members.add(me);
  clusterStateHash=hashProvider.hashCluster(members);
  me.setHash(clusterStateHash);
  reply.setMemberInfo(members);
  return reply;
}

Fixed version (ground truth):
private GossipMessage generateMessage(ClusterMember to){
  GossipMessage reply=new GossipMessage(clusterId,memberId,to.getId());
  List<GossipClusterMember> members=new ArrayList<GossipClusterMember>(activeMembers.values());
  GossipClusterMember me=new GossipClusterMember(memberId,host,port,System.currentTimeMillis(),clusterStateHash);
  members.add(me);
  me.setHash(clusterStateHash);
  reply.setMemberInfo(members);
  return reply;
}
Program: 18151
Project: 18151
Buggy source:
@Override public void launchLibreOffice(String cmisUrl,String repositoryId,String filePath){
  Runtime rt=Runtime.getRuntime();
  try {
    String params=LibreOfficeLauncherHelper.generateLibreOfficeOpenUrl(cmisUrl,repositoryId,filePath);
    StringBuffer cmd=new StringBuffer();
    try {
      String[] binaryLocations={"String_Node_Str","String_Node_Str"};
      for (int i=0; i < binaryLocations.length; i++)       cmd.append((i == 0 ? "String_Node_Str" : "String_Node_Str") + binaryLocations[i] + "String_Node_Str"+ params+ "String_Node_Str");
      rt.exec(new String[]{"String_Node_Str","String_Node_Str",cmd.toString()});
      System.out.println("String_Node_Str" + cmd);
      System.out.println("String_Node_Str");
    }
 catch (    IOException e) {
      JOptionPane.showMessageDialog(null,"String_Node_Str" + cmd.toString(),"String_Node_Str",JOptionPane.ERROR_MESSAGE);
    }
  }
 catch (  UnsupportedEncodingException e1) {
    JOptionPane.showMessageDialog(null,"String_Node_Str","String_Node_Str",JOptionPane.ERROR_MESSAGE);
  }
}

Fixed version (ground truth):
@Override public void launchLibreOffice(String cmisUrl,String repositoryId,String filePath){
  Runtime rt=Runtime.getRuntime();
  try {
    String params=LibreOfficeLauncherHelper.generateLibreOfficeOpenUrl(cmisUrl,repositoryId,filePath);
    StringBuffer cmd=new StringBuffer();
    try {
      String[] binaryLocations={"String_Node_Str","String_Node_Str"};
      for (int i=0; i < binaryLocations.length; i++)       cmd.append((i == 0 ? "String_Node_Str" : "String_Node_Str") + binaryLocations[i] + "String_Node_Str"+ params+ "String_Node_Str");
      System.out.println("String_Node_Str" + cmd);
      rt.exec(new String[]{"String_Node_Str","String_Node_Str",cmd.toString()});
      System.out.println("String_Node_Str");
    }
 catch (    IOException e) {
      JOptionPane.showMessageDialog(null,"String_Node_Str" + cmd.toString(),"String_Node_Str",JOptionPane.ERROR_MESSAGE);
      e.printStackTrace();
    }
  }
 catch (  UnsupportedEncodingException e1) {
    JOptionPane.showMessageDialog(null,"String_Node_Str","String_Node_Str",JOptionPane.ERROR_MESSAGE);
    e1.printStackTrace();
  }
}
Program: 18152
Project: 18152
Buggy source:
@Override public void launchLibreOffice(String cmisUrl,String repositoryId,String filePath){
  Runtime rt=Runtime.getRuntime();
  try {
    String params=LibreOfficeLauncherHelper.generateLibreOfficeOpenUrl(cmisUrl,repositoryId,filePath);
    StringBuffer cmd=new StringBuffer();
    try {
      String[] binaryLocations={"String_Node_Str"};
      for (int i=0; i < binaryLocations.length; i++)       cmd.append((i == 0 ? "String_Node_Str" : "String_Node_Str") + binaryLocations[i] + "String_Node_Str"+ params+ "String_Node_Str");
      rt.exec(new String[]{"String_Node_Str","String_Node_Str",cmd.toString()});
      System.out.println("String_Node_Str" + cmd);
      System.out.println("String_Node_Str");
    }
 catch (    IOException e) {
      JOptionPane.showMessageDialog(null,"String_Node_Str" + cmd.toString(),"String_Node_Str",JOptionPane.ERROR_MESSAGE);
    }
  }
 catch (  UnsupportedEncodingException e1) {
    JOptionPane.showMessageDialog(null,"String_Node_Str","String_Node_Str",JOptionPane.ERROR_MESSAGE);
  }
}

Fixed version (ground truth):
@Override public void launchLibreOffice(String cmisUrl,String repositoryId,String filePath){
  Runtime rt=Runtime.getRuntime();
  try {
    String params=LibreOfficeLauncherHelper.generateLibreOfficeOpenUrl(cmisUrl,repositoryId,filePath);
    StringBuffer cmd=new StringBuffer();
    try {
      String[] binaryLocations={"String_Node_Str"};
      for (int i=0; i < binaryLocations.length; i++)       cmd.append((i == 0 ? "String_Node_Str" : "String_Node_Str") + binaryLocations[i] + "String_Node_Str"+ params+ "String_Node_Str");
      System.out.println("String_Node_Str" + cmd);
      rt.exec(new String[]{cmd.toString()});
      System.out.println("String_Node_Str");
    }
 catch (    IOException e) {
      JOptionPane.showMessageDialog(null,"String_Node_Str" + cmd.toString(),"String_Node_Str",JOptionPane.ERROR_MESSAGE);
      e.printStackTrace();
    }
  }
 catch (  UnsupportedEncodingException e1) {
    JOptionPane.showMessageDialog(null,"String_Node_Str","String_Node_Str",JOptionPane.ERROR_MESSAGE);
    e1.printStackTrace();
  }
}
Program: 18153
Project: 18153
Buggy source:
@Override public void launchLibreOffice(String cmisUrl,String repositoryId,String filePath){
  Runtime rt=Runtime.getRuntime();
  try {
    String params=LibreOfficeLauncherHelper.generateLibreOfficeOpenUrl(cmisUrl,repositoryId,filePath);
    StringBuffer cmd=new StringBuffer();
    try {
      String[] binaryLocations={"String_Node_Str"};
      for (int i=0; i < binaryLocations.length; i++)       cmd.append((i == 0 ? "String_Node_Str" : "String_Node_Str") + binaryLocations[i] + "String_Node_Str"+ params+ "String_Node_Str");
      rt.exec(new String[]{"String_Node_Str","String_Node_Str",cmd.toString()});
      System.out.println("String_Node_Str" + cmd);
      System.out.println("String_Node_Str");
    }
 catch (    IOException e) {
      JOptionPane.showMessageDialog(null,"String_Node_Str" + cmd.toString() + "String_Node_Str"+ e.toString(),"String_Node_Str",JOptionPane.ERROR_MESSAGE);
    }
  }
 catch (  UnsupportedEncodingException e1) {
    JOptionPane.showMessageDialog(null,"String_Node_Str","String_Node_Str",JOptionPane.ERROR_MESSAGE);
  }
}

Fixed version (ground truth):
@Override public void launchLibreOffice(String cmisUrl,String repositoryId,String filePath){
  Runtime rt=Runtime.getRuntime();
  try {
    String params=LibreOfficeLauncherHelper.generateLibreOfficeOpenUrl(cmisUrl,repositoryId,filePath);
    StringBuffer cmd=new StringBuffer();
    try {
      String[] binaryLocations={"String_Node_Str"};
      for (int i=0; i < binaryLocations.length; i++)       cmd.append((i == 0 ? "String_Node_Str" : "String_Node_Str") + binaryLocations[i] + "String_Node_Str"+ params+ "String_Node_Str");
      System.out.println("String_Node_Str" + cmd);
      rt.exec(new String[]{"String_Node_Str","String_Node_Str",cmd.toString()});
      System.out.println("String_Node_Str");
    }
 catch (    IOException e) {
      JOptionPane.showMessageDialog(null,"String_Node_Str" + cmd.toString() + "String_Node_Str"+ e.toString(),"String_Node_Str",JOptionPane.ERROR_MESSAGE);
      e.printStackTrace();
    }
  }
 catch (  UnsupportedEncodingException e1) {
    JOptionPane.showMessageDialog(null,"String_Node_Str","String_Node_Str",JOptionPane.ERROR_MESSAGE);
    e1.printStackTrace();
  }
}
Program: 18154
Project: 18154
Buggy source:
private void createRightLayout(){
  LayoutParams right=new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);
  right.addRule(RelativeLayout.ALIGN_PARENT_TOP);
  right.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
  addView(rightText,right);
}

Fixed version (ground truth):
private void createRightLayout(int width){
  LayoutParams right=new LayoutParams(width,LayoutParams.WRAP_CONTENT);
  right.addRule(RelativeLayout.ALIGN_PARENT_TOP);
  right.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
  addView(rightText,right);
}
Program: 18155
Project: 18155
Buggy source:
private void setupView(Context context){
  setBackgroundResource(android.R.color.transparent);
  createLeftText(context);
  createRightText(context);
  createCenterText(context);
  createLeftLayout();
  createRightLayout();
  createCenterLayout();
}

Fixed version (ground truth):
private void setupView(Context context){
  setBackgroundResource(android.R.color.transparent);
  DisplayMetrics metrics=context.getResources().getDisplayMetrics();
  int maxSize=metrics.widthPixels / 3;
  createLeftText(context);
  createRightText(context);
  createCenterText(context);
  createLeftLayout((int)(metrics.widthPixels * .25));
  createRightLayout((int)(metrics.widthPixels * .25));
  createCenterLayout((int)(metrics.widthPixels * .50));
}
Program: 18156
Project: 18156
Buggy source:
private void createRightText(Context context){
  rightText=new TextView(context);
  rightText.setText("String_Node_Str");
  rightText.setTextSize(18);
  rightText.setTextColor(Color.BLACK);
  rightText.setId(1);
}

Fixed version (ground truth):
private void createRightText(Context context){
  rightText=new TextView(context);
  rightText.setText("String_Node_Str");
  rightText.setTextSize(18);
  rightText.setTextColor(Color.BLACK);
  rightText.setId(1);
  rightText.setGravity(Gravity.CENTER);
}
Program: 18157
Project: 18157
Buggy source:
private void createCenterLayout(){
  LayoutParams right=new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);
  right.addRule(RelativeLayout.ALIGN_PARENT_TOP);
  right.addRule(RelativeLayout.CENTER_IN_PARENT);
  addView(centerText,right);
}

Fixed version (ground truth):
private void createCenterLayout(int width){
  LayoutParams right=new LayoutParams(width,LayoutParams.WRAP_CONTENT);
  right.addRule(RelativeLayout.ALIGN_PARENT_TOP);
  right.addRule(RelativeLayout.CENTER_IN_PARENT);
  addView(centerText,right);
}
Program: 18158
Project: 18158
Buggy source:
private void createCenterText(Context context){
  centerText=new TextView(context);
  centerText.setText("String_Node_Str");
  centerText.setTextSize(18);
  centerText.setTextColor(Color.BLACK);
  centerText.setId(3);
}

Fixed version (ground truth):
private void createCenterText(Context context){
  centerText=new TextView(context);
  centerText.setText("String_Node_Str");
  centerText.setTextSize(18);
  centerText.setTextColor(Color.BLACK);
  centerText.setId(3);
  centerText.setGravity(Gravity.CENTER);
}
Program: 18159
Project: 18159
Buggy source:
private void createLeftLayout(){
  LayoutParams left=new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);
  left.addRule(RelativeLayout.ALIGN_PARENT_TOP);
  left.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
  addView(leftText,left);
}

Fixed version (ground truth):
private void createLeftLayout(int width){
  LayoutParams left=new LayoutParams(width,LayoutParams.WRAP_CONTENT);
  left.addRule(RelativeLayout.ALIGN_PARENT_TOP);
  left.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
  addView(leftText,left);
}
Program: 18160
Project: 18160
Buggy source:
private void createLeftText(Context context){
  leftText=new TextView(context);
  leftText.setText("String_Node_Str");
  leftText.setTextSize(18);
  leftText.setTextColor(Color.BLACK);
  leftText.setId(2);
}

Fixed version (ground truth):
private void createLeftText(Context context){
  leftText=new TextView(context);
  leftText.setText("String_Node_Str");
  leftText.setTextSize(18);
  leftText.setTextColor(Color.BLACK);
  leftText.setId(2);
  leftText.setGravity(Gravity.CENTER);
}
Program: 18161
Project: 18161
Buggy source:
public void clearSelected(){
  setSelected(-1);
}

Fixed version (ground truth):
public void clearSelected(){
  setSelected(NO_VALUE_SELECTED);
}
Program: 18162
Project: 18162
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  Log.d(TAG,"String_Node_Str");
  getAllEntries();
  View view=inflater.inflate(R.layout.list_view,null);
  ListView listView=(ListView)view.findViewById(R.id.listOfAllRecords);
  adapter=new DrivingRecordAdapter(getSherlockActivity(),drivingRecordList);
  listView.setAdapter(adapter);
  listView.setSelector(R.drawable.custom_selector);
  listView.setOnItemClickListener(new AdapterView.OnItemClickListener(){
    @Override public void onItemClick(    AdapterView<?> parent,    View view,    int position,    long id){
      getSherlockActivity().startActionMode(new EditDeleteActionMode(adapter));
      adapter.setSelected(position);
    }
  }
);
  return view;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  Log.d(TAG,"String_Node_Str");
  getAllEntries();
  View view=inflater.inflate(R.layout.list_view,null);
  ListView listView=(ListView)view.findViewById(R.id.listOfAllRecords);
  adapter=new DrivingRecordAdapter(getSherlockActivity(),drivingRecordList);
  listView.setAdapter(adapter);
  listView.setSelector(R.drawable.custom_selector);
  listView.setOnItemClickListener(new AdapterView.OnItemClickListener(){
    @Override public void onItemClick(    AdapterView<?> parent,    View view,    int position,    long id){
      if (adapter.isIndexSelected(DrivingRecordAdapter.NO_VALUE_SELECTED)) {
        actionMode=getSherlockActivity().startActionMode(new EditDeleteActionMode(adapter));
        adapter.setSelected(position);
      }
 else       if (!adapter.isIndexSelected(position)) {
        adapter.setSelected(position);
      }
 else       if (actionMode != null) {
        actionMode.finish();
        actionMode=null;
      }
    }
  }
);
  return view;
}
Program: 18163
Project: 18163
Buggy source:
@Override public void onItemClick(AdapterView<?> parent,View view,int position,long id){
  getSherlockActivity().startActionMode(new EditDeleteActionMode(adapter));
  adapter.setSelected(position);
}

Fixed version (ground truth):
@Override public void onItemClick(AdapterView<?> parent,View view,int position,long id){
  if (adapter.isIndexSelected(DrivingRecordAdapter.NO_VALUE_SELECTED)) {
    actionMode=getSherlockActivity().startActionMode(new EditDeleteActionMode(adapter));
    adapter.setSelected(position);
  }
 else   if (!adapter.isIndexSelected(position)) {
    adapter.setSelected(position);
  }
 else   if (actionMode != null) {
    actionMode.finish();
    actionMode=null;
  }
}
Program: 18164
Project: 18164
Buggy source:
private Constructor<?> findConstructor(Class<?> clazz,Object... args){
  Constructor<?> ctor=null;
  final Constructor<?>[] ctors=clazz.getDeclaredConstructors();
  if (ctors.length == 1 && ctors[0].getParameterTypes().length == args.length) {
    ctor=ctors[0];
  }
  if (ctors.length > 1) {
    for (    Constructor<?> ctor2 : ctors) {
      final Class<?>[] parameterTypes=ctor2.getParameterTypes();
      if (parameterTypes.length != args.length) {
        continue;
      }
      boolean signatureCheckFailed=false;
      for (int i=0; i < parameterTypes.length; i++) {
        if (args[i] != null && !parameterTypes[i].isAssignableFrom(args[i].getClass())) {
          signatureCheckFailed=false;
          break;
        }
      }
      if (!signatureCheckFailed) {
        ctor=ctor2;
        break;
      }
    }
  }
  if (null == ctor) {
    StringBuilder sb=new StringBuilder("String_Node_Str");
    for (    Object object : args) {
      sb.append("String_Node_Str").append(object.getClass().getName()).append("String_Node_Str");
    }
    throw new RuntimeException(sb.toString());
  }
  return ctor;
}

Fixed version (ground truth):
private Constructor<?> findConstructor(Class<?> clazz,Object... args){
  Constructor<?> result=null;
  final Constructor<?>[] ctors=clazz.getDeclaredConstructors();
  if (ctors.length == 1 && ctors[0].getParameterTypes().length == args.length) {
    result=ctors[0];
  }
  if (ctors.length > 1) {
    NEXT_CONSTRUCTOR:     for (    Constructor<?> ctor : ctors) {
      final Class<?>[] parameterTypes=postProcessConstructorParameterTypes(ctor.getParameterTypes());
      if (parameterTypes.length != args.length) {
        continue NEXT_CONSTRUCTOR;
      }
      for (int i=0; i < parameterTypes.length; i++) {
        Class<?> argType=convertToBoxTypeIfPrimitive(args[i].getClass());
        if (args[i] != null && !parameterTypes[i].isAssignableFrom(argType)) {
          continue NEXT_CONSTRUCTOR;
        }
      }
      result=ctor;
      break;
    }
  }
  if (null == result) {
    StringBuilder sb=new StringBuilder("String_Node_Str");
    for (    Object object : args) {
      sb.append("String_Node_Str").append(object.getClass().getName()).append("String_Node_Str");
    }
    throw new RuntimeException(sb.toString());
  }
  return result;
}
Program: 18165
Project: 18165
Buggy source:
@BeforeClass public static void init() throws ClassNotFoundException, SQLException, FileNotFoundException {
  EntityManagerFactory emf=Persistence.createEntityManagerFactory("String_Node_Str");
  em=emf.createEntityManager();
  EntityTransaction trx=em.getTransaction();
  trx.begin();
  Employee e=new Employee();
  e.setName("String_Node_Str");
  em.persist(e);
  trx.commit();
  employeeId=e.getId();
}

Fixed version (ground truth):
@BeforeClass public static void init() throws ClassNotFoundException, SQLException, FileNotFoundException {
  EntityManagerFactory emf=Persistence.createEntityManagerFactory("String_Node_Str");
  em=emf.createEntityManager();
  EntityTransaction trx=em.getTransaction();
  trx.begin();
  Employee e=new Employee();
  e.setName("String_Node_Str");
  em.persist(e);
  trx.commit();
  employeeId=e.getId();
  emplyoeeName=e.getName();
}
Program: 18166
Project: 18166
Buggy source:
@Test public void listWithJpqlWhenUniqueResult(){
  Query q=em.createQuery("String_Node_Str");
  List<Long> list=jpaResultMapper.list(q,Long.class);
  Assert.assertNotNull(list);
  Assert.assertEquals(1,list.size());
  Assert.assertEquals(employeeId,list.get(0).longValue());
}

Fixed version (ground truth):
@Test public void listWithJpqlWhenUniqueResult(){
  Query q=em.createQuery("String_Node_Str");
  List<Integer> list=jpaResultMapper.list(q,Integer.class);
  Assert.assertNotNull(list);
  Assert.assertEquals(1,list.size());
  Assert.assertEquals(employeeId,list.get(0).intValue());
}
Program: 18167
Project: 18167
Buggy source:
private void setupChart(LineChart chart,LineData data,int color){
  ((LineDataSet)data.getDataSetByIndex(0)).setCircleColorHole(color);
  chart.getDescription().setEnabled(false);
  chart.setDrawGridBackground(false);
  chart.setTouchEnabled(true);
  chart.setDragEnabled(true);
  chart.setScaleEnabled(true);
  chart.setPinchZoom(false);
  chart.setBackgroundColor(color);
  chart.setViewPortOffsets(10,0,10,0);
  chart.setData(data);
  Legend l=chart.getLegend();
  l.setEnabled(false);
  chart.getAxisLeft().setEnabled(false);
  chart.getAxisLeft().setSpaceTop(40);
  chart.getAxisLeft().setSpaceBottom(40);
  chart.getAxisRight().setEnabled(false);
  chart.getXAxis().setEnabled(false);
  chart.animateX(2500);
}

Fixed version (ground truth):
private void setupChart(LineChart chart,LineData data,int color){
  ((LineDataSet)data.getDataSetByIndex(0)).setCircleHoleColor(color);
  chart.getDescription().setEnabled(false);
  chart.setDrawGridBackground(false);
  chart.setTouchEnabled(true);
  chart.setDragEnabled(true);
  chart.setScaleEnabled(true);
  chart.setPinchZoom(false);
  chart.setBackgroundColor(color);
  chart.setViewPortOffsets(10,0,10,0);
  chart.setData(data);
  Legend l=chart.getLegend();
  l.setEnabled(false);
  chart.getAxisLeft().setEnabled(false);
  chart.getAxisLeft().setSpaceTop(40);
  chart.getAxisLeft().setSpaceBottom(40);
  chart.getAxisRight().setEnabled(false);
  chart.getXAxis().setEnabled(false);
  chart.animateX(2500);
}
Program: 18168
Project: 18168
Buggy source:
@Override public DataSet<BarEntry> copy(){
  List<BarEntry> yVals=new ArrayList<BarEntry>();
  yVals.clear();
  for (int i=0; i < mValues.size(); i++) {
    yVals.add(mValues.get(i).copy());
  }
  BarDataSet copied=new BarDataSet(yVals,getLabel());
  copied.mColors=mColors;
  copied.mStackSize=mStackSize;
  copied.mBarShadowColor=mBarShadowColor;
  copied.mStackLabels=mStackLabels;
  copied.mHighLightColor=mHighLightColor;
  copied.mHighLightAlpha=mHighLightAlpha;
  return copied;
}

Fixed version (ground truth):
protected void copy(BarDataSet barDataSet){
  super.copy(barDataSet);
  barDataSet.mStackSize=mStackSize;
  barDataSet.mBarShadowColor=mBarShadowColor;
  barDataSet.mBarBorderWidth=mBarBorderWidth;
  barDataSet.mStackLabels=mStackLabels;
  barDataSet.mHighLightAlpha=mHighLightAlpha;
}
Program: 18169
Project: 18169
Buggy source:
@Override public List<GradientColor> getGradientColors(){
  return gradientColors;
}

Fixed version (ground truth):
@Override public List<GradientColor> getGradientColors(){
  return mGradientColors;
}
Program: 18170
Project: 18170
Buggy source:
/** 
 * Sets the start and end color for gradient color, ONLY color that should be used for this DataSet.
 * @param startColor
 * @param endColor
 */
public void setGradientColor(int startColor,int endColor){
  gradientColor=new GradientColor(startColor,endColor);
}

Fixed version (ground truth):
/** 
 * Sets the start and end color for gradient color, ONLY color that should be used for this DataSet.
 * @param startColor
 * @param endColor
 */
public void setGradientColor(int startColor,int endColor){
  mGradientColor=new GradientColor(startColor,endColor);
}
Program: 18171
Project: 18171
Buggy source:
/** 
 * Sets the start and end color for gradient colors, ONLY color that should be used for this DataSet.
 * @param gradientColors
 */
public void setGradientColors(List<GradientColor> gradientColors){
  this.gradientColors=gradientColors;
}

Fixed version (ground truth):
/** 
 * Sets the start and end color for gradient colors, ONLY color that should be used for this DataSet.
 * @param gradientColors
 */
public void setGradientColors(List<GradientColor> gradientColors){
  this.mGradientColors=gradientColors;
}
Program: 18172
Project: 18172
Buggy source:
@Override public GradientColor getGradientColor(int index){
  return gradientColors.get(index % gradientColors.size());
}

Fixed version (ground truth):
@Override public GradientColor getGradientColor(int index){
  return mGradientColors.get(index % mGradientColors.size());
}
Program: 18173
Project: 18173
Buggy source:
@Override public DataSet<BubbleEntry> copy(){
  List<BubbleEntry> yVals=new ArrayList<BubbleEntry>();
  for (int i=0; i < mValues.size(); i++) {
    yVals.add(mValues.get(i).copy());
  }
  BubbleDataSet copied=new BubbleDataSet(yVals,getLabel());
  copied.mColors=mColors;
  copied.mHighLightColor=mHighLightColor;
  return copied;
}

Fixed version (ground truth):
protected void copy(BubbleDataSet bubbleDataSet){
  bubbleDataSet.mHighlightCircleWidth=mHighlightCircleWidth;
  bubbleDataSet.mNormalizeSize=mNormalizeSize;
}
Program: 18174
Project: 18174
Buggy source:
@Override public DataSet<CandleEntry> copy(){
  List<CandleEntry> yVals=new ArrayList<CandleEntry>();
  yVals.clear();
  for (int i=0; i < mValues.size(); i++) {
    yVals.add(mValues.get(i).copy());
  }
  CandleDataSet copied=new CandleDataSet(yVals,getLabel());
  copied.mColors=mColors;
  copied.mShadowWidth=mShadowWidth;
  copied.mShowCandleBar=mShowCandleBar;
  copied.mBarSpace=mBarSpace;
  copied.mHighLightColor=mHighLightColor;
  copied.mIncreasingPaintStyle=mIncreasingPaintStyle;
  copied.mDecreasingPaintStyle=mDecreasingPaintStyle;
  copied.mShadowColor=mShadowColor;
  return copied;
}

Fixed version (ground truth):
protected void copy(CandleDataSet candleDataSet){
  super.copy(candleDataSet);
  candleDataSet.mShadowWidth=mShadowWidth;
  candleDataSet.mShowCandleBar=mShowCandleBar;
  candleDataSet.mBarSpace=mBarSpace;
  candleDataSet.mShadowColorSameAsCandle=mShadowColorSameAsCandle;
  candleDataSet.mHighLightColor=mHighLightColor;
  candleDataSet.mIncreasingPaintStyle=mIncreasingPaintStyle;
  candleDataSet.mDecreasingPaintStyle=mDecreasingPaintStyle;
  candleDataSet.mNeutralColor=mNeutralColor;
  candleDataSet.mIncreasingColor=mIncreasingColor;
  candleDataSet.mDecreasingColor=mDecreasingColor;
  candleDataSet.mShadowColor=mShadowColor;
}
Program: 18175
Project: 18175
Buggy source:
/** 
 * Provides an exact copy of the DataSet this method is used on.
 * @return
 */
public abstract DataSet<T> copy();

Fixed version (ground truth):
/** 
 * @param dataSet
 */
protected void copy(DataSet dataSet){
  super.copy(dataSet);
}
Program: 18176
Project: 18176
Buggy source:
@Override public DataSet<Entry> copy(){
  List<Entry> yVals=new ArrayList<Entry>();
  for (int i=0; i < mValues.size(); i++) {
    yVals.add(mValues.get(i).copy());
  }
  LineDataSet copied=new LineDataSet(yVals,getLabel());
  copied.mMode=mMode;
  copied.mColors=mColors;
  copied.mCircleRadius=mCircleRadius;
  copied.mCircleHoleRadius=mCircleHoleRadius;
  copied.mCircleColors=mCircleColors;
  copied.mDashPathEffect=mDashPathEffect;
  copied.mDrawCircles=mDrawCircles;
  copied.mDrawCircleHole=mDrawCircleHole;
  copied.mHighLightColor=mHighLightColor;
  return copied;
}

Fixed version (ground truth):
protected void copy(LineDataSet lineDataSet){
  super.copy(lineDataSet);
  lineDataSet.mCircleColors=mCircleColors;
  lineDataSet.mCircleHoleColor=mCircleHoleColor;
  lineDataSet.mCircleHoleRadius=mCircleHoleRadius;
  lineDataSet.mCircleRadius=mCircleRadius;
  lineDataSet.mCubicIntensity=mCubicIntensity;
  lineDataSet.mDashPathEffect=mDashPathEffect;
  lineDataSet.mDrawCircleHole=mDrawCircleHole;
  lineDataSet.mDrawCircles=mDrawCircleHole;
  lineDataSet.mFillFormatter=mFillFormatter;
  lineDataSet.mMode=mMode;
}
Program: 18177
Project: 18177
Buggy source:
@Override public int getCircleHoleColor(){
  return mCircleColorHole;
}

Fixed version (ground truth):
@Override public int getCircleHoleColor(){
  return mCircleHoleColor;
}