nus-yam/ex-repair huggingface dataset:
Program: 17986
Project: 17986
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: 17987
Project: 17987
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: 17988
Project: 17988
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: 17989
Project: 17989
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: 17990
Project: 17990
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: 17991
Project: 17991
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: 17992
Project: 17992
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: 17993
Project: 17993
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: 17994
Project: 17994
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: 17996
Project: 17996
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: 17998
Project: 17998
Buggy source:
@Before public void before(){
  try {
    service=createService();
    server.startServer(service);
  }
 catch (  final ODataException e) {
    throw new TestUtilException(e);
  }
}

Fixed version (ground truth):
@Before public void before(){
  try {
    service=createService();
    server.startServer(service);
  }
 catch (  final ODataException e) {
    throw new TestUtilRuntimeException(e);
  }
}
Program: 17999
Project: 17999
Buggy source:
@After public void after(){
  try {
    server.stopServer();
  }
 catch (  final Exception e) {
    throw new TestUtilException(e);
  }
}

Fixed version (ground truth):
@After public void after(){
  try {
    server.stopServer();
  }
 catch (  final Exception e) {
    throw new TestUtilRuntimeException(e);
  }
}
Program: 18000
Project: 18000
Buggy source:
public static void crossProcessLockAcquire(final Class<?> c,final long waitMS){
  RandomAccessFile randomAccessFile=null;
  if ((fileLock == null) && (c != null) && (waitMS > 0)) {
    try {
      final long dropDeadTime=System.currentTimeMillis() + waitMS;
      final File file=new File(lockTempDir,c.getName() + "String_Node_Str");
      randomAccessFile=new RandomAccessFile(file,"String_Node_Str");
      final FileChannel fileChannel=randomAccessFile.getChannel();
      while (System.currentTimeMillis() < dropDeadTime) {
        fileLock=fileChannel.tryLock();
        if (fileLock != null) {
          break;
        }
        Thread.sleep(250);
      }
    }
 catch (    final Exception e) {
      throw new RuntimeException(e);
    }
  }
  if (fileLock == null) {
    throw new ProcessLockerRuntimeException("String_Node_Str" + waitMS);
  }
}

Fixed version (ground truth):
public static void crossProcessLockAcquire(final Class<?> c,final long waitMS){
  RandomAccessFile randomAccessFile=null;
  if ((fileLock == null) && (c != null) && (waitMS > 0)) {
    try {
      final long dropDeadTime=System.currentTimeMillis() + waitMS;
      final File file=new File(lockTempDir,c.getName() + "String_Node_Str");
      randomAccessFile=new RandomAccessFile(file,"String_Node_Str");
      final FileChannel fileChannel=randomAccessFile.getChannel();
      while (System.currentTimeMillis() < dropDeadTime) {
        fileLock=fileChannel.tryLock();
        if (fileLock != null) {
          break;
        }
        Thread.sleep(250);
      }
    }
 catch (    final Exception e) {
      throw new TestUtilRuntimeException(e);
    }
  }
  if (fileLock == null) {
    throw new TestUtilRuntimeException("String_Node_Str" + waitMS);
  }
}
Program: 18001
Project: 18001
Buggy source:
public static void crossProcessLockRelease(){
  if (fileLock != null) {
    try {
      fileLock.release();
      fileLock=null;
    }
 catch (    final IOException e) {
      throw new ProcessLockerRuntimeException(e);
    }
  }
}

Fixed version (ground truth):
public static void crossProcessLockRelease(){
  if (fileLock != null) {
    try {
      fileLock.release();
      fileLock=null;
    }
 catch (    final IOException e) {
      throw new TestUtilRuntimeException(e);
    }
  }
}
Program: 18002
Project: 18002
Buggy source:
/** 
 * simple main to start the tool
 * @param args not used
 */
public static void main(final String[] args) throws Exception {
  activateLoggingToJiraMarkupFile(ACCEPT_HEADER_REQUEST_JIRA_FILENAME);
  final List<String> paths=Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  final List<String> headerValues=Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  final List<TestPath> testPaths=TestPath.createTestPaths(paths,headerValues);
  final CallerResultHandler handler=new CallerResultHandler();
  final String localBaseUrl="String_Node_Str";
  final CallerConfig localConfig=new CallerConfig(localBaseUrl,handler,testPaths);
  AcceptHeaderCaller.create(localConfig).call();
  final String result=handler.getResult();
  LOG.info("String_Node_Str" + new SimpleDateFormat().format(new Date()) + "String_Node_Str");
  LOG.info(result);
}

Fixed version (ground truth):
/** 
 * simple main to start the tool
 * @param args not used
 */
public static void main(final String[] args){
  try {
    activateLoggingToJiraMarkupFile(ACCEPT_HEADER_REQUEST_JIRA_FILENAME);
    final List<String> paths=Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
    final List<String> headerValues=Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
    final List<TestPath> testPaths=TestPath.createTestPaths(paths,headerValues);
    final CallerResultHandler handler=new CallerResultHandler();
    final String localBaseUrl="String_Node_Str";
    final CallerConfig localConfig=new CallerConfig(localBaseUrl,handler,testPaths);
    AcceptHeaderCaller.create(localConfig).call();
    final String result=handler.getResult();
    LOG.info("String_Node_Str" + new SimpleDateFormat().format(new Date()) + "String_Node_Str");
    LOG.info(result);
  }
 catch (  Exception e) {
    throw new TestUtilRuntimeException(e);
  }
}
Program: 18003
Project: 18003
Buggy source:
private void initProxy() throws IllegalArgumentException {
  final String proxyUrl=config.getProxy();
  final String[] hostAndPort=proxyUrl.split("String_Node_Str");
  if (hostAndPort.length != 2) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final String host=hostAndPort[0];
  int port;
  try {
    port=Integer.parseInt(hostAndPort[1]);
  }
 catch (  final NumberFormatException e) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final HttpHost proxy=new HttpHost(host,port);
  LOG.info("String_Node_Str",proxy.getHostName(),proxy.getPort());
  httpClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY,proxy);
}

Fixed version (ground truth):
private void initProxy() throws IllegalArgumentException {
  final String proxyUrl=config.getProxy();
  final String[] hostAndPort=proxyUrl.split("String_Node_Str");
  if (hostAndPort.length != 2) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final String host=hostAndPort[0];
  int port;
  try {
    port=Integer.parseInt(hostAndPort[1]);
  }
 catch (  final NumberFormatException e) {
    throw new IllegalArgumentException("String_Node_Str",e);
  }
  final HttpHost proxy=new HttpHost(host,port);
  LOG.info("String_Node_Str",proxy.getHostName(),proxy.getPort());
  httpClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY,proxy);
}
Program: 18004
Project: 18004
Buggy source:
@Before public void before(){
  try {
    service=createService();
    server.startServer(service);
  }
 catch (  final ODataException e) {
    throw new TestUtilException(e);
  }
}

Fixed version (ground truth):
@Before public void before(){
  try {
    service=createService();
    server.startServer(service);
  }
 catch (  final ODataException e) {
    throw new TestUtilRuntimeException(e);
  }
}
Program: 18005
Project: 18005
Buggy source:
@After public void after(){
  try {
    server.stopServer();
  }
 catch (  final Exception e) {
    throw new TestUtilException(e);
  }
}

Fixed version (ground truth):
@After public void after(){
  try {
    server.stopServer();
  }
 catch (  final Exception e) {
    throw new TestUtilRuntimeException(e);
  }
}
Program: 18006
Project: 18006
Buggy source:
public static void crossProcessLockAcquire(final Class<?> c,final long waitMS){
  RandomAccessFile randomAccessFile=null;
  if ((fileLock == null) && (c != null) && (waitMS > 0)) {
    try {
      final long dropDeadTime=System.currentTimeMillis() + waitMS;
      final File file=new File(lockTempDir,c.getName() + "String_Node_Str");
      randomAccessFile=new RandomAccessFile(file,"String_Node_Str");
      final FileChannel fileChannel=randomAccessFile.getChannel();
      while (System.currentTimeMillis() < dropDeadTime) {
        fileLock=fileChannel.tryLock();
        if (fileLock != null) {
          break;
        }
        Thread.sleep(250);
      }
    }
 catch (    final Exception e) {
      throw new RuntimeException(e);
    }
  }
  if (fileLock == null) {
    throw new ProcessLockerRuntimeException("String_Node_Str" + waitMS);
  }
}

Fixed version (ground truth):
public static void crossProcessLockAcquire(final Class<?> c,final long waitMS){
  RandomAccessFile randomAccessFile=null;
  if ((fileLock == null) && (c != null) && (waitMS > 0)) {
    try {
      final long dropDeadTime=System.currentTimeMillis() + waitMS;
      final File file=new File(lockTempDir,c.getName() + "String_Node_Str");
      randomAccessFile=new RandomAccessFile(file,"String_Node_Str");
      final FileChannel fileChannel=randomAccessFile.getChannel();
      while (System.currentTimeMillis() < dropDeadTime) {
        fileLock=fileChannel.tryLock();
        if (fileLock != null) {
          break;
        }
        Thread.sleep(250);
      }
    }
 catch (    final Exception e) {
      throw new TestUtilRuntimeException(e);
    }
  }
  if (fileLock == null) {
    throw new TestUtilRuntimeException("String_Node_Str" + waitMS);
  }
}
Program: 18007
Project: 18007
Buggy source:
public static void crossProcessLockRelease(){
  if (fileLock != null) {
    try {
      fileLock.release();
      fileLock=null;
    }
 catch (    final IOException e) {
      throw new ProcessLockerRuntimeException(e);
    }
  }
}

Fixed version (ground truth):
public static void crossProcessLockRelease(){
  if (fileLock != null) {
    try {
      fileLock.release();
      fileLock=null;
    }
 catch (    final IOException e) {
      throw new TestUtilRuntimeException(e);
    }
  }
}
Program: 18008
Project: 18008
Buggy source:
/** 
 * simple main to start the tool
 * @param args not used
 */
public static void main(final String[] args) throws Exception {
  activateLoggingToJiraMarkupFile(ACCEPT_HEADER_REQUEST_JIRA_FILENAME);
  final List<String> paths=Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  final List<String> headerValues=Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  final List<TestPath> testPaths=TestPath.createTestPaths(paths,headerValues);
  final CallerResultHandler handler=new CallerResultHandler();
  final String localBaseUrl="String_Node_Str";
  final CallerConfig localConfig=new CallerConfig(localBaseUrl,handler,testPaths);
  AcceptHeaderCaller.create(localConfig).call();
  final String result=handler.getResult();
  LOG.info("String_Node_Str" + new SimpleDateFormat().format(new Date()) + "String_Node_Str");
  LOG.info(result);
}

Fixed version (ground truth):
/** 
 * simple main to start the tool
 * @param args not used
 */
public static void main(final String[] args){
  try {
    activateLoggingToJiraMarkupFile(ACCEPT_HEADER_REQUEST_JIRA_FILENAME);
    final List<String> paths=Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
    final List<String> headerValues=Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
    final List<TestPath> testPaths=TestPath.createTestPaths(paths,headerValues);
    final CallerResultHandler handler=new CallerResultHandler();
    final String localBaseUrl="String_Node_Str";
    final CallerConfig localConfig=new CallerConfig(localBaseUrl,handler,testPaths);
    AcceptHeaderCaller.create(localConfig).call();
    final String result=handler.getResult();
    LOG.info("String_Node_Str" + new SimpleDateFormat().format(new Date()) + "String_Node_Str");
    LOG.info(result);
  }
 catch (  Exception e) {
    throw new TestUtilRuntimeException(e);
  }
}
Program: 18009
Project: 18009
Buggy source:
private void initProxy() throws IllegalArgumentException {
  final String proxyUrl=config.getProxy();
  final String[] hostAndPort=proxyUrl.split("String_Node_Str");
  if (hostAndPort.length != 2) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final String host=hostAndPort[0];
  int port;
  try {
    port=Integer.parseInt(hostAndPort[1]);
  }
 catch (  final NumberFormatException e) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final HttpHost proxy=new HttpHost(host,port);
  LOG.info("String_Node_Str",proxy.getHostName(),proxy.getPort());
  httpClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY,proxy);
}

Fixed version (ground truth):
private void initProxy() throws IllegalArgumentException {
  final String proxyUrl=config.getProxy();
  final String[] hostAndPort=proxyUrl.split("String_Node_Str");
  if (hostAndPort.length != 2) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final String host=hostAndPort[0];
  int port;
  try {
    port=Integer.parseInt(hostAndPort[1]);
  }
 catch (  final NumberFormatException e) {
    throw new IllegalArgumentException("String_Node_Str",e);
  }
  final HttpHost proxy=new HttpHost(host,port);
  LOG.info("String_Node_Str",proxy.getHostName(),proxy.getPort());
  httpClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY,proxy);
}
Program: 18011
Project: 18011
Buggy source:
public static void crossProcessLockAcquire(final Class<?> c,final long waitMS){
  RandomAccessFile randomAccessFile=null;
  if ((fileLock == null) && (c != null) && (waitMS > 0)) {
    try {
      final long dropDeadTime=System.currentTimeMillis() + waitMS;
      final File file=new File(lockTempDir,c.getName() + "String_Node_Str");
      randomAccessFile=new RandomAccessFile(file,"String_Node_Str");
      final FileChannel fileChannel=randomAccessFile.getChannel();
      while (System.currentTimeMillis() < dropDeadTime) {
        fileLock=fileChannel.tryLock();
        if (fileLock != null) {
          break;
        }
        Thread.sleep(250);
      }
    }
 catch (    final Exception e) {
      throw new RuntimeException(e);
    }
  }
  if (fileLock == null) {
    throw new RuntimeException("String_Node_Str" + waitMS);
  }
}

Fixed version (ground truth):
public static void crossProcessLockAcquire(final Class<?> c,final long waitMS){
  RandomAccessFile randomAccessFile=null;
  if ((fileLock == null) && (c != null) && (waitMS > 0)) {
    try {
      final long dropDeadTime=System.currentTimeMillis() + waitMS;
      final File file=new File(lockTempDir,c.getName() + "String_Node_Str");
      randomAccessFile=new RandomAccessFile(file,"String_Node_Str");
      final FileChannel fileChannel=randomAccessFile.getChannel();
      while (System.currentTimeMillis() < dropDeadTime) {
        fileLock=fileChannel.tryLock();
        if (fileLock != null) {
          break;
        }
        Thread.sleep(250);
      }
    }
 catch (    final Exception e) {
      throw new RuntimeException(e);
    }
  }
  if (fileLock == null) {
    throw new ProcessLockerRuntimeException("String_Node_Str" + waitMS);
  }
}
Program: 18012
Project: 18012
Buggy source:
public static void crossProcessLockRelease(){
  if (fileLock != null) {
    try {
      fileLock.release();
      fileLock=null;
    }
 catch (    final IOException e) {
      throw new RuntimeException(e);
    }
  }
}

Fixed version (ground truth):
public static void crossProcessLockRelease(){
  if (fileLock != null) {
    try {
      fileLock.release();
      fileLock=null;
    }
 catch (    final IOException e) {
      throw new ProcessLockerRuntimeException(e);
    }
  }
}
Program: 18013
Project: 18013
Buggy source:
public void stopServer(){
  try {
    if (server != null) {
      FitStaticServiceFactory.unbindService(this);
      server.stop();
      log.trace("String_Node_Str" + getEndpoint().toASCIIString());
    }
  }
 catch (  final Exception e) {
    throw new ServerException(e);
  }
}

Fixed version (ground truth):
public void stopServer(){
  try {
    if (server != null) {
      FitStaticServiceFactory.unbindService(this);
      server.stop();
      log.trace("String_Node_Str" + getEndpoint().toASCIIString());
    }
  }
 catch (  final Exception e) {
    throw new ServerRuntimeException(e);
  }
}
Program: 18018
Project: 18018
Buggy source:
public <T>Object build(Object jpaEntity,PutMergePatchUriInfo putUriInfo,InputStream content,String requestContentType) throws ODataJPARuntimeException {
  final EdmEntitySet entitySet=putUriInfo.getTargetEntitySet();
  EdmEntityType entityType=null;
  try {
    entityType=entitySet.getEntityType();
  }
 catch (  EdmException e3) {
    throw ODataJPARuntimeException.throwException(ODataJPARuntimeException.GENERAL.addContent(e3.getMessage()),e3);
  }
  String entityName=null;
  try {
    if (entityType.getMapping() != null && entityType.getMapping().getInternalName() != null) {
      entityName=entityType.getMapping().getInternalName();
    }
 else {
      entityName=entityType.getName();
    }
  }
 catch (  EdmException e1) {
  }
  Set<EntityType<?>> entityTypeSet=this.metamodel.getEntities();
  String currentEntityName=null;
  for (  EntityType<?> entityTypeTemp : entityTypeSet) {
    if (entityTypeTemp.getJavaType().getName().endsWith("String_Node_Str" + entityName)) {
      currentEntityName=entityTypeTemp.getName();
      break;
    }
  }
  ODataEntry entryValues=null;
  try {
    entryValues=parseEntry(entitySet,content,requestContentType,false,new HashMap<String,Object>());
  }
 catch (  ODataBadRequestException e1) {
    throw ODataJPARuntimeException.throwException(ODataJPARuntimeException.GENERAL.addContent(e1.getMessage()),e1);
  }
  try {
    Map<String,Object> propertValueMap=entryValues.getProperties();
    parse2JPAEntityValueMap(jpaEntity,entityType,propertValueMap,currentEntityName);
  }
 catch (  ODataJPARuntimeException e) {
    throw ODataJPARuntimeException.throwException(ODataJPARuntimeException.GENERAL.addContent(e.getMessage()),e);
  }
  return jpaEntity;
}

Fixed version (ground truth):
public <T>Object build(Object jpaEntity,PutMergePatchUriInfo putUriInfo,InputStream content,String requestContentType) throws ODataJPARuntimeException {
  final EdmEntitySet entitySet=putUriInfo.getTargetEntitySet();
  EdmEntityType entityType=null;
  try {
    entityType=entitySet.getEntityType();
  }
 catch (  EdmException e3) {
    throw ODataJPARuntimeException.throwException(ODataJPARuntimeException.GENERAL.addContent(e3.getMessage()),e3);
  }
  ODataEntry entryValues=null;
  try {
    entryValues=parseEntry(entitySet,content,requestContentType,false,new HashMap<String,Object>());
  }
 catch (  ODataBadRequestException e1) {
    throw ODataJPARuntimeException.throwException(ODataJPARuntimeException.GENERAL.addContent(e1.getMessage()),e1);
  }
  try {
    Map<String,Object> propertValueMap=entryValues.getProperties();
    parse2JPAEntityValueMap(jpaEntity,entityType,propertValueMap);
  }
 catch (  ODataJPARuntimeException e) {
    throw ODataJPARuntimeException.throwException(ODataJPARuntimeException.GENERAL.addContent(e.getMessage()),e);
  }
  return jpaEntity;
}
Program: 18019
Project: 18019
Buggy source:
public JPAUpdateContext(Metamodel metamodel){
  this();
  this.metamodel=metamodel;
}

Fixed version (ground truth):
public JPAUpdateContext(Metamodel metamodel){
  this();
}
Program: 18024
Project: 18024
Buggy source:
public <T>Object build(Object jpaEntity,PutMergePatchUriInfo putUriInfo,InputStream content,String requestContentType) throws ODataJPARuntimeException {
  final EdmEntitySet entitySet=putUriInfo.getTargetEntitySet();
  EdmEntityType entityType=null;
  try {
    entityType=entitySet.getEntityType();
  }
 catch (  EdmException e3) {
    throw ODataJPARuntimeException.throwException(ODataJPARuntimeException.GENERAL.addContent(e3.getMessage()),e3);
  }
  String entityName=null;
  try {
    if (entityType.getMapping() != null && entityType.getMapping().getInternalName() != null) {
      entityName=entityType.getMapping().getInternalName();
    }
 else {
      entityName=entityType.getName();
    }
  }
 catch (  EdmException e1) {
  }
  Set<EntityType<?>> entityTypeSet=this.metamodel.getEntities();
  String currentEntityName=null;
  for (  EntityType<?> entityTypeTemp : entityTypeSet) {
    if (entityTypeTemp.getJavaType().getName().endsWith("String_Node_Str" + entityName)) {
      currentEntityName=entityTypeTemp.getName();
      break;
    }
  }
  ODataEntry entryValues=null;
  try {
    entryValues=parseEntry(entitySet,content,requestContentType,false,new HashMap<String,Object>());
  }
 catch (  ODataBadRequestException e1) {
    throw ODataJPARuntimeException.throwException(ODataJPARuntimeException.GENERAL.addContent(e1.getMessage()),e1);
  }
  try {
    Map<String,Object> propertValueMap=entryValues.getProperties();
    parse2JPAEntityValueMap(jpaEntity,entityType,propertValueMap,currentEntityName);
  }
 catch (  ODataJPARuntimeException e) {
    throw ODataJPARuntimeException.throwException(ODataJPARuntimeException.GENERAL.addContent(e.getMessage()),e);
  }
  return jpaEntity;
}

Fixed version (ground truth):
public <T>Object build(Object jpaEntity,PutMergePatchUriInfo putUriInfo,InputStream content,String requestContentType) throws ODataJPARuntimeException {
  final EdmEntitySet entitySet=putUriInfo.getTargetEntitySet();
  EdmEntityType entityType=null;
  try {
    entityType=entitySet.getEntityType();
  }
 catch (  EdmException e3) {
    throw ODataJPARuntimeException.throwException(ODataJPARuntimeException.GENERAL.addContent(e3.getMessage()),e3);
  }
  ODataEntry entryValues=null;
  try {
    entryValues=parseEntry(entitySet,content,requestContentType,false,new HashMap<String,Object>());
  }
 catch (  ODataBadRequestException e1) {
    throw ODataJPARuntimeException.throwException(ODataJPARuntimeException.GENERAL.addContent(e1.getMessage()),e1);
  }
  try {
    Map<String,Object> propertValueMap=entryValues.getProperties();
    parse2JPAEntityValueMap(jpaEntity,entityType,propertValueMap);
  }
 catch (  ODataJPARuntimeException e) {
    throw ODataJPARuntimeException.throwException(ODataJPARuntimeException.GENERAL.addContent(e.getMessage()),e);
  }
  return jpaEntity;
}
Program: 18025
Project: 18025
Buggy source:
public JPAUpdateContext(Metamodel metamodel){
  this();
  this.metamodel=metamodel;
}

Fixed version (ground truth):
public JPAUpdateContext(Metamodel metamodel){
  this();
}
Program: 18026
Project: 18026
Buggy source:
/** 
 * @param reader
 * @param entitySet
 * @throws XMLStreamException
 * @throws EdmException
 * @throws EntityProviderException
 */
private void readProperties(final XMLStreamReader reader,final EntityInfoAggregator entitySet) throws XMLStreamException, EdmException, EntityProviderException {
  checkAllMandatoryNamespacesAvailable();
  validateNamespace(reader.getName(),Edm.NAMESPACE_M_2007_08);
  if (entitySet.getEntityType().hasStream()) {
    checkCurrentHandledStartTag(FormatXml.M_PROPERTIES);
  }
 else {
    checkCurrentHandledStartTag(ATOM_CONTENT);
  }
  int nextTagEventType=reader.next();
  XmlPropertyConsumer xpc=new XmlPropertyConsumer();
  boolean run=true;
  EntityPropertyInfo property;
  while (run) {
    if (nextTagEventType == XMLStreamConstants.START_ELEMENT) {
      if (isEdmNamespaceProperty(reader)) {
        String name=getValidPropertyName(reader);
        property=getValidatedPropertyInfo(entitySet,name);
        Object value=xpc.readStartedElement(reader,property,typeMappings);
        properties.put(name,value);
      }
    }
 else     if (nextTagEventType == XMLStreamConstants.END_ELEMENT) {
      String name=reader.getLocalName();
      if (M_PROPERTIES.equals(name)) {
        run=false;
      }
    }
    nextTagEventType=reader.next();
  }
}

Fixed version (ground truth):
/** 
 * @param reader
 * @param entitySet
 * @throws XMLStreamException
 * @throws EdmException
 * @throws EntityProviderException
 */
private void readProperties(final XMLStreamReader reader,final EntityInfoAggregator entitySet) throws XMLStreamException, EdmException, EntityProviderException {
  checkAllMandatoryNamespacesAvailable();
  validateNamespace(reader.getName(),Edm.NAMESPACE_M_2007_08);
  if (entitySet.getEntityType().hasStream()) {
    checkCurrentHandledStartTag(FormatXml.M_PROPERTIES);
  }
 else {
    checkCurrentHandledStartTag(ATOM_CONTENT);
  }
  EntityPropertyInfo property;
  String closeTag=null;
  int nextTagEventType=reader.next();
  XmlPropertyConsumer xpc=new XmlPropertyConsumer();
  boolean run=true;
  while (run) {
    if (nextTagEventType == XMLStreamConstants.START_ELEMENT && closeTag == null) {
      closeTag=reader.getLocalName();
      if (isEdmNamespaceProperty(reader)) {
        String name=getValidPropertyName(reader);
        property=getValidatedPropertyInfo(entitySet,name);
        Object value=xpc.readStartedElement(reader,property,typeMappings);
        properties.put(name,value);
        closeTag=null;
      }
    }
 else     if (nextTagEventType == XMLStreamConstants.END_ELEMENT) {
      String name=reader.getLocalName();
      if (M_PROPERTIES.equals(name)) {
        run=false;
      }
 else       if (name.equals(closeTag)) {
        closeTag=null;
      }
    }
    nextTagEventType=reader.next();
  }
}
Program: 18027
Project: 18027
Buggy source:
/** 
 * Duplicated occurrence of <code>d:Name</code> tag must result in an exception.
 * @throws Exception
 */
@Test @Ignore("String_Node_Str") public void validationOfDoublePropertyDifferentTagHierachyD_Namespace() throws Exception {
  String room="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  EdmEntitySet entitySet=MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("String_Node_Str");
  InputStream reqContent=createContentAsStream(room);
  XmlEntityConsumer xec=new XmlEntityConsumer();
  ODataEntry result=xec.readEntry(entitySet,reqContent,false);
  assertNotNull(result);
}

Fixed version (ground truth):
/** 
 * Duplicated occurrence of <code>d:Name</code> tag must result in an exception.
 * @throws Exception
 */
@Test public void validationOfDoublePropertyDifferentTagHierachyD_Namespace() throws Exception {
  String room="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  EdmEntitySet entitySet=MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("String_Node_Str");
  InputStream reqContent=createContentAsStream(room);
  XmlEntityConsumer xec=new XmlEntityConsumer();
  ODataEntry result=xec.readEntry(entitySet,reqContent,false);
  assertNotNull(result);
}
Program: 18028
Project: 18028
Buggy source:
public void validate(final EntityInfoAggregator eia,final ODataEntryImpl entry) throws EntityProviderException {
  Collection<EntityPropertyInfo> propertyInfos=eia.getPropertyInfos();
  Map<String,Object> data=entry.getProperties();
  for (  EntityPropertyInfo entityPropertyInfo : propertyInfos) {
    boolean mandatory=entityPropertyInfo.isMandatory();
    if (mandatory) {
      if (!data.containsKey(entityPropertyInfo.getName())) {
        throw new EntityProviderException(EntityProviderException.MISSING_PROPERTY.addContent(entityPropertyInfo.getName()));
      }
    }
  }
}

Fixed version (ground truth):
public void validate(final EntityInfoAggregator eia,final ODataEntryImpl entry) throws EntityProviderException {
  Collection<EntityPropertyInfo> propertyInfos=new ArrayList<EntityPropertyInfo>(eia.getPropertyInfos());
  propertyInfos.removeAll(eia.getKeyPropertyInfos());
  Map<String,Object> data=entry.getProperties();
  for (  EntityPropertyInfo entityPropertyInfo : propertyInfos) {
    boolean mandatory=entityPropertyInfo.isMandatory();
    if (mandatory) {
      if (!data.containsKey(entityPropertyInfo.getName())) {
        throw new EntityProviderException(EntityProviderException.MISSING_PROPERTY.addContent(entityPropertyInfo.getName()));
      }
    }
  }
}
Program: 18029
Project: 18029
Buggy source:
@Test(expected=EntityProviderException.class) public void validationOfNamespacesMissingD_NamespaceAtRequiredTag() throws Exception {
  String roomWithValidNamespaces="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  EdmEntitySet entitySet=MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("String_Node_Str");
  InputStream reqContent=createContentAsStream(roomWithValidNamespaces);
  readAndExpectException(entitySet,reqContent,false,EntityProviderException.MISSING_PROPERTY.addContent("String_Node_Str"));
}

Fixed version (ground truth):
/** 
 * Missing _d_ namespace at mandatory property/tag (_Version_) results in an exception.
 * @throws Exception
 */
@Test(expected=EntityProviderException.class) public void validationOfNamespacesMissingD_NamespaceAtRequiredTag() throws Exception {
  String roomWithValidNamespaces="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  EdmEntitySet entitySet=MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("String_Node_Str");
  InputStream reqContent=createContentAsStream(roomWithValidNamespaces);
  readAndExpectException(entitySet,reqContent,false,EntityProviderException.MISSING_PROPERTY.addContent("String_Node_Str"));
}
Program: 18030
Project: 18030
Buggy source:
/** 
 * Duplicated occurrence of <code>d:Name</code> tag must result in an exception.
 * @throws Exception
 */
@Test public void validationOfDoublePropertyDifferentTagHierachyD_Namespace() throws Exception {
  String room="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  EdmEntitySet entitySet=MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("String_Node_Str");
  InputStream reqContent=createContentAsStream(room);
  XmlEntityConsumer xec=new XmlEntityConsumer();
  ODataEntry result=xec.readEntry(entitySet,reqContent,false);
  assertNotNull(result);
}

Fixed version (ground truth):
/** 
 * Double occurrence of <code>d:Name</code> tag within an unknown (and hence ignored) property is allowed.
 * @throws Exception
 */
@Test public void validationOfDoublePropertyDifferentTagHierachyD_Namespace() throws Exception {
  String room="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  EdmEntitySet entitySet=MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("String_Node_Str");
  InputStream reqContent=createContentAsStream(room);
  XmlEntityConsumer xec=new XmlEntityConsumer();
  ODataEntry result=xec.readEntry(entitySet,reqContent,false);
  assertNotNull(result);
}
Program: 18031
Project: 18031
Buggy source:
/** 
 * Duplicated occurrence of <code>d:Name</code> tag must result in an exception.
 * @throws Exception
 */
@Test(expected=EntityProviderException.class) public void validationOfDuplicatedPropertyException() throws Exception {
  String room="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  EdmEntitySet entitySet=MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("String_Node_Str");
  InputStream reqContent=createContentAsStream(room);
  readAndExpectException(entitySet,reqContent,EntityProviderException.DOUBLE_PROPERTY.addContent("String_Node_Str"));
}

Fixed version (ground truth):
/** 
 * Double occurrence of <code>d:Name</code> tag must result in an exception.
 * @throws Exception
 */
@Test(expected=EntityProviderException.class) public void validationOfDuplicatedPropertyException() throws Exception {
  String room="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  EdmEntitySet entitySet=MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("String_Node_Str");
  InputStream reqContent=createContentAsStream(room);
  readAndExpectException(entitySet,reqContent,EntityProviderException.DOUBLE_PROPERTY.addContent("String_Node_Str"));
}