nus-yam/ex-repair huggingface dataset:
Program: 36086
Project: 36086
Buggy source:
/** 
 * @return A List of all Timex objects, including the document creation time.
 */
public List<Timex> getTimexes(){
  List<Timex> timexes=new ArrayList<Timex>();
  for (  SieveSentence sent : sentences)   timexes.addAll(sent.timexes());
  timexes.addAll(dcts);
  return timexes;
}

Fixed version (ground truth):
/** 
 * @return A List of all Timex objects, including the document creation time.
 */
public List<Timex> getTimexes(){
  List<Timex> timexes=new ArrayList<Timex>();
  for (  SieveSentence sent : sentences)   timexes.addAll(sent.timexes());
  if (dcts != null)   timexes.addAll(dcts);
  return timexes;
}
Program: 36087
Project: 36087
Buggy source:
public void addTimexes(List<Timex> newTimexes){
  timexes.addAll(newTimexes);
}

Fixed version (ground truth):
public void addTimexes(List<Timex> newTimexes){
  for (  Timex timex : newTimexes)   timex.setSID(this.sid);
  timexes.addAll(newTimexes);
}
Program: 36088
Project: 36088
Buggy source:
public List<TLink> annotate(SieveDocument doc,List<TLink> currentTLinks){
  List<List<Timex>> allTimexes=this.allTimexesBySentencePair(doc.getTimexesBySentence());
  List<TLink> proposed=new ArrayList<TLink>();
  Timex creationTime=doc.getDocstamp().isEmpty() ? null : doc.getDocstamp().get(0);
  for (  List<Timex> closeTimexes : allTimexes) {
    for (int t1=0; t1 < closeTimexes.size(); t1++) {
      for (int t2=t1 + 1; t2 < closeTimexes.size(); t2++) {
        TLink link=this.orderTimexes(closeTimexes.get(t1),closeTimexes.get(t2),creationTime);
        if (link != null)         proposed.add(link);
      }
    }
  }
  return proposed;
}

Fixed version (ground truth):
public List<TLink> annotate(SieveDocument doc,List<TLink> currentTLinks){
  List<List<Timex>> allTimexes=this.allTimexesBySentencePair(doc.getTimexesBySentence());
  List<TLink> proposed=new ArrayList<TLink>();
  Timex creationTime=(doc.getDocstamp() == null || doc.getDocstamp().isEmpty()) ? null : doc.getDocstamp().get(0);
  for (  List<Timex> closeTimexes : allTimexes) {
    for (int t1=0; t1 < closeTimexes.size(); t1++) {
      for (int t2=t1 + 1; t2 < closeTimexes.size(); t2++) {
        TLink link=this.orderTimexes(closeTimexes.get(t1),closeTimexes.get(t2),creationTime);
        if (link != null)         proposed.add(link);
      }
    }
  }
  return proposed;
}
Program: 36089
Project: 36089
Buggy source:
public Closure(String path){
  loadClosureRules(path);
}

Fixed version (ground truth):
public Closure(String path) throws IOException {
  loadClosureRules(path);
}
Program: 36090
Project: 36090
Buggy source:
/** 
 * Reads the closure rules from a data file
 */
private void loadClosureRules(String path){
  try {
    int matchCase=0;
    int numAdded=0;
    BufferedReader in=new BufferedReader(new FileReader(path));
    System.out.println("String_Node_Str" + path);
    rules=new HashMap[4];
    for (int i=0; i < 4; i++) {
      rules[i]=new HashMap<String,TLink.TYPE>();
    }
    while (in.ready()) {
      String line=in.readLine();
      if (line.matches("String_Node_Str"))       matchCase=0;
 else       if (line.matches("String_Node_Str"))       matchCase=1;
 else       if (line.matches("String_Node_Str"))       matchCase=2;
 else       if (line.matches("String_Node_Str"))       matchCase=3;
 else       if (line.indexOf('/') > -1) {
      }
 else       if (line.length() > 5) {
        String parts[]=line.split("String_Node_Str");
        TLink.TYPE first=TLink.TYPE.valueOf(parts[0]);
        TLink.TYPE second=TLink.TYPE.valueOf(parts[1]);
        TLink.TYPE closed=TLink.TYPE.valueOf(parts[2]);
        rules[matchCase].put(first + "String_Node_Str" + second,closed);
        numAdded++;
      }
    }
    if (numAdded == 0) {
      System.out.println("String_Node_Str");
    }
  }
 catch (  Exception ex) {
    ex.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * Reads the closure rules from a data file
 */
private void loadClosureRules(String path) throws IOException {
  int matchCase=0;
  int numAdded=0;
  BufferedReader in=new BufferedReader(new FileReader(path));
  try {
    System.out.println("String_Node_Str" + path);
    rules=new HashMap[4];
    for (int i=0; i < 4; i++) {
      rules[i]=new HashMap<String,TLink.TYPE>();
    }
    while (in.ready()) {
      String line=in.readLine();
      if (line.matches("String_Node_Str"))       matchCase=0;
 else       if (line.matches("String_Node_Str"))       matchCase=1;
 else       if (line.matches("String_Node_Str"))       matchCase=2;
 else       if (line.matches("String_Node_Str"))       matchCase=3;
 else       if (line.indexOf('/') > -1) {
      }
 else       if (line.length() > 5) {
        String parts[]=line.split("String_Node_Str");
        TLink.TYPE first=TLink.TYPE.valueOf(parts[0]);
        TLink.TYPE second=TLink.TYPE.valueOf(parts[1]);
        TLink.TYPE closed=TLink.TYPE.valueOf(parts[2]);
        rules[matchCase].put(first + "String_Node_Str" + second,closed);
        numAdded++;
      }
    }
    if (numAdded == 0) {
      System.out.println("String_Node_Str");
    }
  }
  finally {
    in.close();
  }
}
Program: 36091
Project: 36091
Buggy source:
public Annotator(){
  labeledLookup=new HashMap<String,String>();
  labeledRelations=new ArrayList<TLink>();
  closure=new Closure("String_Node_Str");
}

Fixed version (ground truth):
public Annotator() throws IOException {
  labeledLookup=new HashMap<String,String>();
  labeledRelations=new ArrayList<TLink>();
  closure=new Closure("String_Node_Str");
}
Program: 36092
Project: 36092
Buggy source:
/** 
 * @param args
 */
public static void main(String[] args){
  Annotator anno=new Annotator();
  if (args.length == 1) {
    anno.readHTML(args[0]);
    anno.prompt();
  }
 else   if (args.length == 2) {
    anno.readHTML(args[0]);
    anno.loadProgressFile(args[1]);
    anno.prompt();
  }
}

Fixed version (ground truth):
/** 
 * @param args
 */
public static void main(String[] args) throws Exception {
  Annotator anno=new Annotator();
  if (args.length == 1) {
    anno.readHTML(args[0]);
    anno.prompt();
  }
 else   if (args.length == 2) {
    anno.readHTML(args[0]);
    anno.loadProgressFile(args[1]);
    anno.prompt();
  }
}
Program: 36093
Project: 36093
Buggy source:
Repository(Log logger,boolean suppressTypesFromJavaRuntime,String... regexIgnoredClasses){
  this.logger=logger;
  this.suppressTypesFromJavaRuntime=suppressTypesFromJavaRuntime;
  if ((regexIgnoredClasses == null) || (regexIgnoredClasses.length == 0)) {
    ignoredClassesPattern=Pattern.compile(JAVA_TYPES_REGEX);
  }
 else {
    final StringBuilder regexBuilder=new StringBuilder(JAVA_TYPES_REGEX);
    for (    String regex : regexIgnoredClasses) {
      regexBuilder.append("String_Node_Str").append(regex).append("String_Node_Str");
    }
    final String regex=regexBuilder.toString();
    logger.debug("String_Node_Str" + regex + "String_Node_Str");
    ignoredClassesPattern=Pattern.compile(regex);
  }
}

Fixed version (ground truth):
Repository(Log logger,boolean suppressTypesFromJavaRuntime,String... regexIgnoredClasses){
  this.logger=logger;
  this.suppressTypesFromJavaRuntime=suppressTypesFromJavaRuntime;
  if ((regexIgnoredClasses == null) || (regexIgnoredClasses.length == 0)) {
    ignoredClassesPattern=Pattern.compile(JAVA_TYPES_REGEX);
  }
 else {
    final StringBuilder regexBuilder=new StringBuilder(JAVA_TYPES_REGEX);
    for (    String regex : regexIgnoredClasses) {
      if (StringUtils.isNotEmpty(regex)) {
        regexBuilder.append("String_Node_Str").append(regex).append("String_Node_Str");
      }
    }
    final String regex=regexBuilder.toString();
    logger.debug("String_Node_Str" + regex + "String_Node_Str");
    ignoredClassesPattern=Pattern.compile(regex);
  }
}
Program: 36094
Project: 36094
Buggy source:
private void analyzeJar(Repository repository,File jar){
  final ClassVisitor classVisitor=new ClassDependencyResolvingVisitor(repository,logger);
  try (ZipFile zipFile=new ZipFile(jar.getAbsolutePath())){
    final Enumeration<? extends ZipEntry> entries=zipFile.entries();
    while (entries.hasMoreElements()) {
      final ZipEntry entry=entries.nextElement();
      final String fileName=entry.getName();
      if (fileName.endsWith(CLASS_SUFFIX)) {
        logger.debug("String_Node_Str" + fileName + "String_Node_Str"+ jar+ "String_Node_Str");
        final ClassReader classReader=new ClassReader(zipFile.getInputStream(entry));
        if (analyzeDependencies) {
          classReader.accept(classVisitor,ClassReader.SKIP_FRAMES);
        }
 else {
          repository.addType(classReader.getClassName().replace('/','.'));
        }
      }
    }
  }
 catch (  IOException e) {
    final String error="String_Node_Str" + jar + "String_Node_Str";
    logger.error(error,e);
    throw new IllegalStateException(error,e);
  }
}

Fixed version (ground truth):
private void analyzeJar(Repository repository,File jar){
  final ClassVisitor classVisitor=new ClassDependencyResolvingVisitor(repository,logger);
  try (ZipFile zipFile=new ZipFile(jar.getAbsolutePath())){
    final Enumeration<? extends ZipEntry> entries=zipFile.entries();
    while (entries.hasMoreElements()) {
      final ZipEntry entry=entries.nextElement();
      final String fileName=entry.getName();
      if (fileName.endsWith(CLASS_SUFFIX)) {
        if (logger.isDebugEnabled()) {
          logger.debug("String_Node_Str" + fileName + "String_Node_Str"+ jar+ "String_Node_Str");
        }
        final ClassReader classReader=new ClassReader(zipFile.getInputStream(entry));
        if (analyzeDependencies) {
          classReader.accept(classVisitor,ClassReader.SKIP_FRAMES);
        }
 else {
          repository.addType(classReader.getClassName().replace('/','.'));
        }
      }
    }
  }
 catch (  IOException e) {
    final String error="String_Node_Str" + jar + "String_Node_Str";
    logger.error(error,e);
    throw new IllegalStateException(error,e);
  }
}
Program: 36095
Project: 36095
Buggy source:
private void analyzeClassesDirectory(Repository repository,File directory,ClassVisitor classVisitor){
  if (directory.isDirectory()) {
    final String[] entries=directory.list();
    for (    String entry : entries) {
      analyzeClassesDirectory(repository,new File(directory,entry),classVisitor);
    }
  }
  final String path=directory.getPath();
  if (path.endsWith(CLASS_SUFFIX)) {
    logger.debug("String_Node_Str" + path + "String_Node_Str");
    try (FileInputStream classFileStream=new FileInputStream(directory)){
      final ClassReader classReader=new ClassReader(classFileStream);
      if (analyzeDependencies) {
        classReader.accept(classVisitor,ClassReader.SKIP_FRAMES);
      }
 else {
        repository.addType(classReader.getClassName().replace('/','.'));
      }
    }
 catch (    IOException e) {
      final String error="String_Node_Str" + directory + "String_Node_Str";
      logger.error(error,e);
      throw new IllegalStateException(error,e);
    }
  }
}

Fixed version (ground truth):
private void analyzeClassesDirectory(Repository repository,File directory,ClassVisitor classVisitor){
  if (directory.isDirectory()) {
    final String[] entries=directory.list();
    for (    String entry : entries) {
      analyzeClassesDirectory(repository,new File(directory,entry),classVisitor);
    }
  }
  final String path=directory.getPath();
  if (path.endsWith(CLASS_SUFFIX)) {
    if (logger.isDebugEnabled()) {
      logger.debug("String_Node_Str" + path + "String_Node_Str");
    }
    try (FileInputStream classFileStream=new FileInputStream(directory)){
      final ClassReader classReader=new ClassReader(classFileStream);
      if (analyzeDependencies) {
        classReader.accept(classVisitor,ClassReader.SKIP_FRAMES);
      }
 else {
        repository.addType(classReader.getClassName().replace('/','.'));
      }
    }
 catch (    IOException e) {
      final String error="String_Node_Str" + directory + "String_Node_Str";
      logger.error(error,e);
      throw new IllegalStateException(error,e);
    }
  }
}
Program: 36096
Project: 36096
Buggy source:
@Override public void visitOuterClass(String owner,String name,String desc){
  logger.debug("String_Node_Str" + desc);
}

Fixed version (ground truth):
@Override public void visitOuterClass(String owner,String name,String desc){
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str" + desc);
  }
}
Program: 36097
Project: 36097
Buggy source:
private void addDependency(String typeDescription,String typeName){
  final String dependency=ARRAY_BRACKETS.matcher(typeName).replaceAll("String_Node_Str");
  logger.debug("String_Node_Str" + typeDescription + "String_Node_Str"+ dependency+ "String_Node_Str");
  repository.addDependency(dependency);
}

Fixed version (ground truth):
private void addDependency(String typeDescription,String typeName){
  final String dependency=ARRAY_BRACKETS.matcher(typeName).replaceAll("String_Node_Str");
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str" + typeDescription + "String_Node_Str"+ dependency+ "String_Node_Str");
  }
  repository.addDependency(dependency);
}
Program: 36098
Project: 36098
Buggy source:
private boolean typeFromJavaRuntime(String type){
  if (JAVA_RUNTIME_PACKAGES.matcher(type).matches()) {
    final String classResource=type.replace('.','/') + "String_Node_Str";
    final URL it=ClassLoader.getSystemClassLoader().getResource(classResource);
    if (it != null) {
      final String sourcePath=it.getFile();
      if (sourcePath.startsWith(JAVA_HOME_PATH)) {
        logger.debug("String_Node_Str" + type + "String_Node_Str"+ JAVA_HOME_PATH+ "String_Node_Str");
        return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean typeFromJavaRuntime(String type){
  if (JAVA_RUNTIME_PACKAGES.matcher(type).matches()) {
    final Boolean isJdkType=alreadyProcessedJavaTypes.get(type);
    if (isJdkType != null) {
      if (logger.isDebugEnabled()) {
        logger.debug("String_Node_Str" + type + "String_Node_Str");
      }
      return isJdkType;
    }
    final String classResource=type.replace('.','/') + "String_Node_Str";
    final URL it=ClassLoader.getSystemClassLoader().getResource(classResource);
    if (it != null) {
      final String sourcePath=it.getFile();
      if (sourcePath.startsWith(JAVA_HOME_PATH)) {
        if (logger.isDebugEnabled()) {
          logger.debug("String_Node_Str" + type + "String_Node_Str"+ JAVA_HOME_PATH+ "String_Node_Str");
        }
        alreadyProcessedJavaTypes.put(type,true);
        return true;
      }
    }
    alreadyProcessedJavaTypes.put(type,false);
    return false;
  }
  return false;
}
Program: 36099
Project: 36099
Buggy source:
private void addFiltered(Collection<String> set,String type){
  if (ignoredClassesPattern.matcher(type).matches()) {
    logger.debug("String_Node_Str" + type + "String_Node_Str");
    return;
  }
  if (suppressTypesFromJavaRuntime && typeFromJavaRuntime(type)) {
    return;
  }
  set.add(type);
}

Fixed version (ground truth):
private void addFiltered(Collection<String> set,String type){
  if (ignoredClassesPattern.matcher(type).matches()) {
    if (logger.isDebugEnabled()) {
      logger.debug("String_Node_Str" + type + "String_Node_Str");
    }
    return;
  }
  if (suppressTypesFromJavaRuntime && typeFromJavaRuntime(type)) {
    return;
  }
  set.add(type);
}
Program: 36100
Project: 36100
Buggy source:
ClassInDirectDependency referenceClassInDirectAndTransitiveDependency(ClassInTransitiveDependency referenceToClassInTransitiveDependency,double d,Float f,X string){
  final ClassInTransitiveDependency localReference=referenceToClassInTransitiveDependency;
  try {
    final Long longValue=someTee(Long.class);
  }
 catch (  SQLException e) {
  }
  final DataSource dataSource=null;
  final Text text=null;
  final DiagnosticCommandMBean dcmb=null;
  final int k=3 + 4;
  final Date date=new Date(System.currentTimeMillis());
  float m=Math.max(1,2);
  final Class<String[]> stringArrayClass=String[].class;
  final Class<Long[][]> longArrayArrayClass=Long[][].class;
  final ClassInDirectDependency directDependency=new ClassInDirectDependency();
  final String s=String.valueOf(directDependency.getOne());
  return directDependency;
}

Fixed version (ground truth):
ClassInDirectDependency referenceClassInDirectAndTransitiveDependency(ClassInTransitiveDependency referenceToClassInTransitiveDependency,double d,Float f,X string){
  final ClassInTransitiveDependency localReference=referenceToClassInTransitiveDependency;
  try {
    final Long longValue=someTee(Long.class);
  }
 catch (  SQLException e) {
  }
  final DataSource dataSource=null;
  final DataSource secondDataSource=null;
  final DataSource thirdDataSource=null;
  final Text text=null;
  final DiagnosticCommandMBean dcmb=null;
  final int k=3 + 4;
  final Date date=new Date(System.currentTimeMillis());
  float m=Math.max(1,2);
  final Class<String[]> stringArrayClass=String[].class;
  final Class<Long[][]> longArrayArrayClass=Long[][].class;
  final ClassInDirectDependency directDependency=new ClassInDirectDependency();
  final String s=String.valueOf(directDependency.getOne());
  return directDependency;
}
Program: 36101
Project: 36101
Buggy source:
public static <T>WrappedNbtTag<T> read(DataInput dataInput){
  try {
    if (READ == null) {
      Class<?> readLimiter=MinecraftReflection.getNbtReadLimiterClass();
      ClassTemplate template=new Reflection().reflect(readLimiter);
      FieldAccessor<Object> instanceField=template.getSafeFieldByType(readLimiter).getAccessor();
      final Object singletonInstance=instanceField.getStatic();
      List<SafeMethod> candidates=template.getSafeMethods(withArguments(DataInput.class,int.class,readLimiter));
      if (candidates.size() > 0) {
        WRITE=candidates.get(0).getAccessor();
      }
 else {
        throw new RuntimeException("String_Node_Str");
      }
      if (LOAD == null) {
        LOAD=new NbtLoad(){
          @Override public Object load(          DataInput dataInput){
            return READ.invokeStatic(dataInput,0,singletonInstance);
          }
        }
;
      }
    }
    return NbtFactory.fromNmsHandle(LOAD.load(dataInput));
  }
 catch (  Exception e) {
    throw new RuntimeException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
public static <T>WrappedNbtTag<T> read(DataInput dataInput){
  try {
    if (READ == null) {
      Class<?> readLimiter=MinecraftReflection.getNbtReadLimiterClass();
      ClassTemplate limiterTemplate=new Reflection().reflect(readLimiter);
      ClassTemplate tagTemplate=new Reflection().reflect(MinecraftReflection.getNbtBaseClass());
      FieldAccessor<Object> instanceField=limiterTemplate.getSafeFieldByType(readLimiter).getAccessor();
      final Object singletonInstance=instanceField.getStatic();
      List<SafeMethod> candidates=tagTemplate.getSafeMethods(withArguments(DataInput.class,int.class,readLimiter));
      if (candidates.size() > 0) {
        WRITE=candidates.get(0).getAccessor();
      }
 else {
        throw new RuntimeException("String_Node_Str");
      }
      if (LOAD == null) {
        LOAD=new NbtLoad(){
          @Override public Object load(          DataInput dataInput){
            return READ.invokeStatic(dataInput,0,singletonInstance);
          }
        }
;
      }
    }
    return NbtFactory.fromNmsHandle(LOAD.load(dataInput));
  }
 catch (  Exception e) {
    throw new RuntimeException("String_Node_Str",e);
  }
}
Program: 36102
Project: 36102
Buggy source:
public static Set<Class<?>> getAllSuperClasses(final Class<?> clazz,Matcher<? super Class<?>> matchers){
  return match(getAllSuperClasses(clazz),matchers);
}

Fixed version (ground truth):
public static Set<Class<?>> getAllSuperClasses(final Class<?> clazz,Matcher<? super Class<?>>... matchers){
  return match(getAllSuperClasses(clazz),matchers);
}
Program: 36103
Project: 36103
Buggy source:
@Override public int getArgumentCount(){
  return this.constructor.getParameterCount();
}

Fixed version (ground truth):
@Override public int getArgumentCount(){
  return this.constructor.getParameterTypes().length;
}
Program: 36104
Project: 36104
Buggy source:
@Override public int getArgumentCount(){
  return this.method.getParameterCount();
}

Fixed version (ground truth):
@Override public int getArgumentCount(){
  return this.method.getParameterTypes().length;
}
Program: 36105
Project: 36105
Buggy source:
public static Matcher<Method> withArgumentCount(final int argumentCount){
  return new AbstractMatcher<Method>(){
    @Override public boolean matches(    Method type){
      return type.getParameterCount() == argumentCount;
    }
  }
;
}

Fixed version (ground truth):
public static Matcher<Method> withArgumentCount(final int argumentCount){
  return new AbstractMatcher<Method>(){
    @Override public boolean matches(    Method type){
      return type.getParameterTypes().length == argumentCount;
    }
  }
;
}
Program: 36106
Project: 36106
Buggy source:
public ClassFile(final byte[] bytes) throws IOException, ClassFormatException {
  DataInputStream codeStream=new DataInputStream(new ByteArrayInputStream(bytes));
  this.magic=codeStream.readInt();
  if (magic != 0xCAFEBABE) {
    throw new IOException("String_Node_Str" + Integer.toHexString(magic) + "String_Node_Str");
  }
  this.minor=codeStream.readUnsignedShort();
  this.major=codeStream.readUnsignedShort();
  if (major > JDK_8) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.constantPool=new ConstantPool(codeStream);
  this.accessFlags=codeStream.readUnsignedShort();
  this.thisClass=codeStream.readUnsignedShort();
  this.superClass=codeStream.readUnsignedShort();
  int interfacesCount=codeStream.readUnsignedShort();
  this.interfaces=new int[interfacesCount];
  for (int i=0; i < interfacesCount; i++) {
    this.interfaces[i]=codeStream.readUnsignedShort();
  }
  int fieldCount=codeStream.readUnsignedShort();
  this.fields=new Field[interfacesCount];
  for (int i=0; i < fieldCount; i++) {
    this.fields[i]=new Field(codeStream,this.constantPool);
  }
  int methodCount=codeStream.readUnsignedShort();
  this.methods=new Method[methodCount];
  for (int i=0; i < methodCount; i++) {
    this.methods[i]=new Method(codeStream,this.constantPool);
  }
  int attributeCount=codeStream.readUnsignedShort();
  this.attributes=new Attribute[attributeCount];
  for (int i=0; i < attributeCount; i++) {
    this.attributes[i]=Attribute.readAttribute(codeStream,this.constantPool);
  }
}

Fixed version (ground truth):
public ClassFile(final byte[] bytes) throws IOException, ClassFormatException {
  DataInputStream codeStream=new DataInputStream(new ByteArrayInputStream(bytes));
  this.magic=codeStream.readInt();
  if (magic != 0xCAFEBABE) {
    throw new IOException("String_Node_Str" + Integer.toHexString(magic) + "String_Node_Str");
  }
  this.minor=codeStream.readUnsignedShort();
  this.major=codeStream.readUnsignedShort();
  if (major > JDK_8) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.constantPool=new ConstantPool(codeStream);
  this.accessFlags=codeStream.readUnsignedShort();
  this.thisClass=codeStream.readUnsignedShort();
  this.superClass=codeStream.readUnsignedShort();
  int interfacesCount=codeStream.readUnsignedShort();
  this.interfaces=new int[interfacesCount];
  for (int i=0; i < interfacesCount; i++) {
    this.interfaces[i]=codeStream.readUnsignedShort();
  }
  int fieldCount=codeStream.readUnsignedShort();
  this.fields=new FieldInfo[fieldCount];
  for (int i=0; i < fieldCount; i++) {
    this.fields[i]=new FieldInfo(codeStream,this.constantPool);
  }
  int methodCount=codeStream.readUnsignedShort();
  this.methods=new MethodInfo[methodCount];
  for (int i=0; i < methodCount; i++) {
    this.methods[i]=new MethodInfo(codeStream,this.constantPool);
  }
  int attributeCount=codeStream.readUnsignedShort();
  this.attributes=new Attribute[attributeCount];
  for (int i=0; i < attributeCount; i++) {
    this.attributes[i]=Attribute.readAttribute(codeStream,this.constantPool);
  }
}
Program: 36107
Project: 36107
Buggy source:
public Field[] getFields(){
  return this.fields;
}

Fixed version (ground truth):
public FieldInfo[] getFields(){
  return this.fields;
}
Program: 36108
Project: 36108
Buggy source:
public final void write(DataOutputStream codeStream) throws IOException {
  codeStream.writeInt(0xCAFEBABE);
  codeStream.writeShort(this.minor);
  codeStream.writeShort(this.major);
  this.constantPool.write(codeStream);
  codeStream.writeShort(this.accessFlags);
  codeStream.writeShort(this.thisClass);
  codeStream.writeShort(this.superClass);
  codeStream.writeShort(this.interfaces.length);
  for (  int i : this.interfaces) {
    codeStream.writeShort(i);
  }
  codeStream.writeShort(this.fields.length);
  for (  Field field : this.fields) {
    field.write(codeStream);
  }
  codeStream.writeShort(this.methods.length);
  for (  Method method : this.methods) {
    method.write(codeStream);
  }
  if (this.attributes != null) {
    codeStream.writeShort(this.attributes.length);
    for (    Attribute attribute : this.attributes) {
      attribute.write(codeStream);
    }
  }
 else {
    codeStream.writeShort(0);
  }
  codeStream.flush();
}

Fixed version (ground truth):
public final void write(DataOutputStream codeStream) throws IOException {
  codeStream.writeInt(0xCAFEBABE);
  codeStream.writeShort(this.minor);
  codeStream.writeShort(this.major);
  this.constantPool.write(codeStream);
  codeStream.writeShort(this.accessFlags);
  codeStream.writeShort(this.thisClass);
  codeStream.writeShort(this.superClass);
  codeStream.writeShort(this.interfaces.length);
  for (  int i : this.interfaces) {
    codeStream.writeShort(i);
  }
  codeStream.writeShort(this.fields.length);
  for (  FieldInfo fieldInfo : this.fields) {
    fieldInfo.write(codeStream);
  }
  codeStream.writeShort(this.methods.length);
  for (  MethodInfo methodInfo : this.methods) {
    methodInfo.write(codeStream);
  }
  if (this.attributes != null) {
    codeStream.writeShort(this.attributes.length);
    for (    Attribute attribute : this.attributes) {
      attribute.write(codeStream);
    }
  }
 else {
    codeStream.writeShort(0);
  }
  codeStream.flush();
}
Program: 36109
Project: 36109
Buggy source:
public Method[] getMethods(){
  return this.methods;
}

Fixed version (ground truth):
public MethodInfo[] getMethods(){
  return this.methods;
}
Program: 36110
Project: 36110
Buggy source:
@Test public void testBytecode() throws IOException, ClassFormatException {
  ClassFile classFile=new ClassFile(ClassUtils.classToBytes(ClassFileTest.class.getCanonicalName()));
  log("String_Node_Str" + classFile.getClassName());
  log("String_Node_Str" + classFile.getSuperClassName());
  log("String_Node_Str" + Integer.toHexString(classFile.getAccessFlags()));
  log("String_Node_Str" + classFile.getSourceFile());
}

Fixed version (ground truth):
@Test public void testBytecode() throws IOException, ClassFormatException {
  ClassFile classFile=new ClassFile(ClassUtils.classToBytes(ClassFileTest.class.getCanonicalName()));
  log("String_Node_Str" + classFile.getClassName());
  log("String_Node_Str" + classFile.getSuperClassName());
  log("String_Node_Str" + Integer.toHexString(classFile.getAccessFlags()));
  log("String_Node_Str");
  for (  MethodInfo info : classFile.getMethods()) {
    log(info.getSignature());
  }
}
Program: 36111
Project: 36111
Buggy source:
public Class defineClass(byte[] bytes){
  return super.defineClass(ClassReader.this.getClassName(),bytes,0,bytes.length);
}

Fixed version (ground truth):
public Class defineClass(byte[] bytes){
  return super.defineClass(ClassReader.this.getClassName().replace('/','.'),bytes,0,bytes.length);
}
Program: 36112
Project: 36112
Buggy source:
public final void write(DataOutputStream codeStream) throws IOException {
  codeStream.writeShort(this.size);
  for (int i=0; i < this.constantPool.length; i++) {
    if (this.constantPool[i] == null)     continue;
    this.constantPool[i].write(codeStream);
  }
}

Fixed version (ground truth):
public final void write(DataOutputStream codeStream) throws IOException {
  codeStream.writeShort(this.size);
  for (int i=1; i < this.size; i++) {
    if (this.constantPool[i] != null) {
      this.constantPool[i].write(codeStream);
    }
  }
}
Program: 36113
Project: 36113
Buggy source:
protected void read(DataInputStream inputStream) throws IOException, ClassFormatException {
  byte tag;
  size=inputStream.readUnsignedShort();
  constantPool=new Constant[size];
  for (int i=1; i < size; i++) {
    constantPool[i]=Constant.readConstant(inputStream);
    tag=constantPool[i].getTag();
    if ((tag == CONSTANT_Double) || (tag == CONSTANT_Long)) {
      i++;
    }
  }
}

Fixed version (ground truth):
protected void read(DataInputStream inputStream) throws IOException, ClassFormatException {
  byte tag;
  this.size=inputStream.readUnsignedShort();
  this.constantPool=new Constant[this.size];
  for (int i=1; i < this.size; i++) {
    this.constantPool[i]=Constant.readConstant(inputStream);
    tag=constantPool[i].getTag();
    if ((tag == CONSTANT_Double) || (tag == CONSTANT_Long)) {
      i++;
    }
  }
}
Program: 36114
Project: 36114
Buggy source:
public String getName() throws ClassFormatException {
  Utf8Constant constant=(Utf8Constant)this.constantPool.getConstant(this.nameIndex,CONSTANT_Utf8);
  return constant.getString();
}

Fixed version (ground truth):
public String getName() throws ClassFormatException {
  Utf8Constant constant=this.constantPool.getUtf8(this.nameIndex);
  return constant.getString();
}
Program: 36116
Project: 36116
Buggy source:
@Override public void write(DataOutputStream codeStream) throws IOException {
  super.write(codeStream);
  codeStream.writeShort(this.maxStack);
  codeStream.writeShort(this.maxLocals);
  codeStream.writeInt(this.codeLength);
  codeStream.write(this.code,0,this.codeLength);
  codeStream.write(this.exceptionTableLength);
  for (int i=0; i < this.exceptionTableLength; i++) {
    this.exceptionTable[i].write(codeStream);
  }
  codeStream.writeShort(this.attributeCount);
  for (int i=0; i < this.attributeCount; i++) {
    this.attributes[i].write(codeStream);
  }
}

Fixed version (ground truth):
@Override public void write(DataOutputStream codeStream) throws IOException {
  super.write(codeStream);
  codeStream.writeShort(this.maxStack);
  codeStream.writeShort(this.maxLocals);
  codeStream.writeInt(this.codeLength);
  codeStream.write(this.code,0,this.codeLength);
  codeStream.writeShort(this.exceptionTableLength);
  for (int i=0; i < this.exceptionTableLength; i++) {
    this.exceptionTable[i].write(codeStream);
  }
  codeStream.writeShort(this.attributeCount);
  for (int i=0; i < this.attributeCount; i++) {
    this.attributes[i].write(codeStream);
  }
}
Program: 36117
Project: 36117
Buggy source:
@Override public void write(DataOutputStream codeStream) throws IOException {
  codeStream.writeByte(this.tag);
  codeStream.write(this.name);
}

Fixed version (ground truth):
@Override public void write(DataOutputStream codeStream) throws IOException {
  codeStream.writeByte(this.tag);
  codeStream.writeShort(this.name);
}
Program: 36118
Project: 36118
Buggy source:
@Test public void test() throws IOException, ClassFormatException {
  ClassReader reader=new ClassReader(ClassReaderTest.class.getCanonicalName());
  log("String_Node_Str" + reader.getMagic());
  log("String_Node_Str" + reader.getMinor());
  log("String_Node_Str" + reader.getMajor());
  log("String_Node_Str" + reader.getAccessFlags());
  log("String_Node_Str" + reader.getClassName());
  log("String_Node_Str" + reader.getSuperClassName());
  log("String_Node_Str");
  log("String_Node_Str");
  for (  Interface iface : reader.getInterfaces()) {
    log("String_Node_Str" + iface.getName());
  }
  log("String_Node_Str");
  log("String_Node_Str");
  for (  FieldInfo field : reader.getFields()) {
    log("String_Node_Str" + field.getName());
    log("String_Node_Str" + field.getAccessFlags());
    log("String_Node_Str" + field.getSignature());
    log("String_Node_Str");
    for (    Attribute attribute : field.getAttributes()) {
      log("String_Node_Str" + attribute.getName());
    }
  }
  log("String_Node_Str");
  log("String_Node_Str");
  for (  MethodInfo method : reader.getMethods()) {
    log("String_Node_Str" + method.getName());
    log("String_Node_Str" + method.getAccessFlags());
    log("String_Node_Str" + method.getSignature());
    log("String_Node_Str");
    for (    Attribute attribute : method.getAttributes()) {
      log("String_Node_Str" + attribute.getName());
    }
  }
  log("String_Node_Str");
  log("String_Node_Str");
  for (  Attribute attribute : reader.getAttributes()) {
    log("String_Node_Str" + attribute.getName());
  }
}

Fixed version (ground truth):
@Test public void test() throws IOException, ClassFormatException {
  ClassReader reader=new ClassReader(HelloWorld.class.getCanonicalName());
  log("String_Node_Str");
  print(reader);
  Class<?> testClass=reader.defineClass();
  reader=new ClassReader(reader.getByteCode());
  print(reader);
  log("String_Node_Str" + testClass.getCanonicalName());
}
Program: 36119
Project: 36119
Buggy source:
public <F>JsonRpcClientLocal(JsonRpcHandler<? extends Object> handler){
  this.remoteHandler=handler;
  this.remoteHandlerManager.setJsonRpcHandler(remoteHandler);
  session=new ClientSession("String_Node_Str",null,this);
  rsHelper=new JsonRpcRequestSenderHelper(){
    @Override public <P,R>Response<R> internalSendRequest(    Request<P> request,    Class<R> resultClass) throws IOException {
      return localSendRequest(request,resultClass);
    }
    @Override protected void internalSendRequest(    Request<? extends Object> request,    Class<JsonElement> resultClass,    Continuation<Response<JsonElement>> continuation){
      Response<JsonElement> result=localSendRequest(request,resultClass);
      if (result == null) {
        continuation.onSuccess(result);
      }
    }
  }
;
}

Fixed version (ground truth):
public <F>JsonRpcClientLocal(JsonRpcHandler<? extends Object> handler){
  this.remoteHandler=handler;
  this.remoteHandlerManager.setJsonRpcHandler(remoteHandler);
  session=new ClientSession("String_Node_Str",null,this);
  rsHelper=new JsonRpcRequestSenderHelper(){
    @Override public <P,R>Response<R> internalSendRequest(    Request<P> request,    Class<R> resultClass) throws IOException {
      return localSendRequest(request,resultClass);
    }
    @Override protected void internalSendRequest(    Request<? extends Object> request,    Class<JsonElement> resultClass,    Continuation<Response<JsonElement>> continuation){
      Response<JsonElement> result=localSendRequest(request,resultClass);
      if (result != null) {
        continuation.onSuccess(result);
      }
    }
  }
;
}
Program: 36120
Project: 36120
Buggy source:
@Test public void objectRefTestAsync() throws InterruptedException {
  SampleClass obj=factory.getFactory(SampleClass.Factory.class).create("String_Node_Str",false).withAtt3(0.5f).withAtt4(22).build();
  final SampleClass obj2=factory.getFactory(SampleClass.Factory.class).create("String_Node_Str",false).withAtt3(0.5f).withAtt4(22).build();
  final BlockingQueue<SampleClass> queue=new ArrayBlockingQueue<>(1);
  obj.echoObjectRef(obj2,new Continuation<SampleClass>(){
    @Override public void onSuccess(    SampleClass obj3){
      queue.add(obj3);
    }
    @Override public void onError(    Throwable cause){
    }
  }
);
  SampleClass obj3=queue.poll(2000,MILLISECONDS);
  Assert.assertNotNull(obj3);
  assertEquals(obj3.getAtt1(),obj2.getAtt1());
  assertEquals(obj3.getAtt2(),obj2.getAtt2());
}

Fixed version (ground truth):
@Test public void objectRefTestAsync() throws InterruptedException {
  SampleClass obj=factory.getFactory(SampleClass.Factory.class).create("String_Node_Str",false).withAtt3(0.5f).withAtt4(22).build();
  final SampleClass obj2=factory.getFactory(SampleClass.Factory.class).create("String_Node_Str",false).withAtt3(0.5f).withAtt4(22).build();
  final BlockingQueue<SampleClass> queue=new ArrayBlockingQueue<>(1);
  obj.echoObjectRef(obj2,new Continuation<SampleClass>(){
    @Override public void onSuccess(    SampleClass obj3){
      queue.add(obj3);
    }
    @Override public void onError(    Throwable cause){
    }
  }
);
  SampleClass obj3=queue.poll(10000,MILLISECONDS);
  Assert.assertNotNull(obj3);
  assertEquals(obj3.getAtt1(),obj2.getAtt1());
  assertEquals(obj3.getAtt2(),obj2.getAtt2());
}
Program: 36121
Project: 36121
Buggy source:
@Test public void test() throws TException, IOException, InterruptedException {
  System.setProperty(KeepAliveManager.KEEP_ALIVE_INTERVAL_TIME_PROPERTY,"String_Node_Str");
  log.info("String_Node_Str");
  JsonRpcServerThrift server=new JsonRpcServerThrift(new EchoJsonRpcHandler(),"String_Node_Str",19292);
  server.start();
  log.info("String_Node_Str");
  long initTime=System.nanoTime();
  log.info("String_Node_Str");
  JsonRpcClient client=new JsonRpcClientThrift("String_Node_Str",19292,"String_Node_Str",7979);
  if (!latch.await(15,TimeUnit.SECONDS)) {
    Assert.fail("String_Node_Str");
  }
 else {
    long duration=((System.nanoTime() - initTime) / 1000000);
    Assert.assertTrue("String_Node_Str" + duration + "String_Node_Str"+ (NUM_KEEP_ALIVES * 1000)+ "String_Node_Str",duration > NUM_KEEP_ALIVES * 1000);
    Assert.assertTrue("String_Node_Str" + duration + "String_Node_Str"+ ((NUM_KEEP_ALIVES + 1) * 1000)+ "String_Node_Str",duration < (NUM_KEEP_ALIVES + 1) * 1000);
  }
  client.close();
  log.info("String_Node_Str");
  server.destroy();
  log.info("String_Node_Str");
}

Fixed version (ground truth):
@Test public void test() throws TException, IOException, InterruptedException {
  System.setProperty(KeepAliveManager.KEEP_ALIVE_INTERVAL_TIME_PROPERTY,"String_Node_Str");
  log.info("String_Node_Str");
  JsonRpcServerThrift server=new JsonRpcServerThrift(new EchoJsonRpcHandler(),"String_Node_Str",19292);
  server.start();
  log.info("String_Node_Str");
  long initTime=System.nanoTime();
  log.info("String_Node_Str");
  JsonRpcClient client=new JsonRpcClientThrift("String_Node_Str",19292,"String_Node_Str",7979);
  if (!latch.await(15,TimeUnit.SECONDS)) {
    Assert.fail("String_Node_Str");
  }
 else {
    long duration=((System.nanoTime() - initTime) / 1000000);
    Assert.assertTrue("String_Node_Str" + duration + "String_Node_Str"+ (NUM_KEEP_ALIVES * 1000)+ "String_Node_Str",duration > NUM_KEEP_ALIVES * 1000);
    Assert.assertTrue("String_Node_Str" + NUM_KEEP_ALIVES + "String_Node_Str"+ duration+ "String_Node_Str"+ ((NUM_KEEP_ALIVES + 3) * 1000)+ "String_Node_Str",duration < (NUM_KEEP_ALIVES + 3) * 1000);
  }
  client.close();
  log.info("String_Node_Str");
  server.destroy();
  log.info("String_Node_Str");
}
Program: 36122
Project: 36122
Buggy source:
protected void internalSendRequestThrift(Request<Object> request,final Class<JsonElement> resultClass,final Continuation<Response<JsonElement>> continuation){
  log.debug("String_Node_Str",request);
  if (request.getMethod().equals("String_Node_Str")) {
    JsonObject params=(JsonObject)request.getParams();
    params.addProperty("String_Node_Str",localHandlerAddress.getHostString());
    params.addProperty("String_Node_Str",Integer.valueOf(localHandlerAddress.getPort()));
  }
  sendRequest(request,resultClass,continuation,true);
}

Fixed version (ground truth):
protected void internalSendRequestThrift(Request<Object> request,final Class<JsonElement> resultClass,final Continuation<Response<JsonElement>> continuation){
  log.debug("String_Node_Str",request);
  processRequest(request);
  sendRequest(request,resultClass,continuation,true);
}
Program: 36123
Project: 36123
Buggy source:
@Override public void onComplete(invokeJsonRpc_call thriftResponse){
  clientPool.release(client);
  try {
    String response=thriftResponse.getResult();
    log.debug("String_Node_Str",response.trim());
    continuation.onSuccess(JsonUtils.fromJsonResponse(response,resultClass));
  }
 catch (  TException e) {
    continuation.onError(e);
  }
}

Fixed version (ground truth):
@Override public void onComplete(invokeJsonRpc_call thriftResponse){
  clientPool.release(client);
  try {
    String responseStr=thriftResponse.getResult();
    log.debug("String_Node_Str",responseStr.trim());
    Response<JsonElement> response=JsonUtils.fromJsonResponse(responseStr,resultClass);
    processResponse(response);
    continuation.onSuccess(response);
  }
 catch (  TException e) {
    continuation.onError(e);
  }
}
Program: 36124
Project: 36124
Buggy source:
@Override public void run(){
  while (true) {
    try {
      Thread.sleep(KEEP_ALIVE_TIME);
    }
 catch (    InterruptedException e) {
      return;
    }
synchronized (keepAliveThread) {
      if (stopKeepAlive) {
        return;
      }
    }
    Set<String> copiedSessions;
synchronized (sessions) {
      copiedSessions=new HashSet<>(sessions);
    }
    for (    String copiedSession : copiedSessions) {
      int id=new Random().nextInt();
      Request<Void> request=new Request<>(copiedSession,Integer.valueOf(id),"String_Node_Str",null);
      log.info("String_Node_Str",copiedSession);
      try {
        Response<Void> response=internalSendRequestThrift(request,Void.class);
        if (response.isError()) {
          log.error("String_Node_Str",copiedSession);
synchronized (sessions) {
            sessions.remove(copiedSession);
          }
        }
      }
 catch (      TransportException e) {
        log.warn("String_Node_Str",copiedSession,e);
      }
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  log.debug("String_Node_Str");
  while (true) {
    try {
      Thread.sleep(KEEP_ALIVE_TIME);
    }
 catch (    InterruptedException e) {
      return;
    }
    log.debug("String_Node_Str");
synchronized (keepAliveThread) {
      if (stopKeepAlive) {
        return;
      }
    }
    Set<String> copiedSessions;
synchronized (sessions) {
      copiedSessions=new HashSet<>(sessions);
    }
    for (    String copiedSession : copiedSessions) {
      int id=new Random().nextInt();
      Request<Void> request=new Request<>(copiedSession,Integer.valueOf(id),"String_Node_Str",null);
      log.info("String_Node_Str",copiedSession);
      try {
        Response<Void> response=internalSendRequestThrift(request,Void.class);
        if (response.isError()) {
          log.error("String_Node_Str",copiedSession);
synchronized (sessions) {
            sessions.remove(copiedSession);
          }
        }
      }
 catch (      TransportException e) {
        log.warn("String_Node_Str",copiedSession,e);
      }
    }
  }
}
Program: 36125
Project: 36125
Buggy source:
private void sendRequest(final Request<Object> request,final Class<JsonElement> resultClass,final Continuation<Response<JsonElement>> continuation,final boolean retry){
  final AsyncClient client=clientPool.acquireAsync();
  try {
    client.invokeJsonRpc(request.toString(),new AsyncMethodCallback<AsyncClient.invokeJsonRpc_call>(){
      @Override public void onError(      Exception exception){
        clientPool.release(client);
        log.error("String_Node_Str",exception);
        if (retry && exception instanceof ConnectException) {
          sendRequest(request,resultClass,continuation,false);
        }
 else {
          continuation.onError(exception);
        }
      }
      @Override public void onComplete(      invokeJsonRpc_call thriftResponse){
        clientPool.release(client);
        try {
          String response=thriftResponse.getResult();
          log.debug("String_Node_Str",response.trim());
          continuation.onSuccess(JsonUtils.fromJsonResponse(response,resultClass));
        }
 catch (        TException e) {
          continuation.onError(e);
        }
      }
    }
);
  }
 catch (  TException e) {
    log.error("String_Node_Str",e);
    continuation.onError(e);
  }
}

Fixed version (ground truth):
private void sendRequest(final Request<Object> request,final Class<JsonElement> resultClass,final Continuation<Response<JsonElement>> continuation,final boolean retry){
  final AsyncClient client=clientPool.acquireAsync();
  try {
    client.invokeJsonRpc(request.toString(),new AsyncMethodCallback<AsyncClient.invokeJsonRpc_call>(){
      @Override public void onError(      Exception exception){
        clientPool.release(client);
        log.error("String_Node_Str",exception);
        if (retry && exception instanceof ConnectException) {
          sendRequest(request,resultClass,continuation,false);
        }
 else {
          continuation.onError(exception);
        }
      }
      @Override public void onComplete(      invokeJsonRpc_call thriftResponse){
        clientPool.release(client);
        try {
          String responseStr=thriftResponse.getResult();
          log.debug("String_Node_Str",responseStr.trim());
          Response<JsonElement> response=JsonUtils.fromJsonResponse(responseStr,resultClass);
          processResponse(response);
          continuation.onSuccess(response);
        }
 catch (        TException e) {
          continuation.onError(e);
        }
      }
    }
);
  }
 catch (  TException e) {
    log.error("String_Node_Str",e);
    continuation.onError(e);
  }
}
Program: 36126
Project: 36126
Buggy source:
public KwsBowerTest(){
  kwsUrl=getProperty("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public KwsBowerTest(){
  kwsUrl="String_Node_Str";
}
Program: 36127
Project: 36127
Buggy source:
private <P,R>Response<R> internalSendRequestWebSocket(Request<P> request,Class<R> resultClass) throws IOException {
  connectIfNecessary();
  Future<Response<JsonElement>> responseFuture=null;
  if (request.getId() != null) {
    responseFuture=pendingRequests.prepareResponse(request.getId());
  }
  String jsonMessage=request.toString();
synchronized (wsSession) {
    wsSession.sendMessage(new TextMessage(jsonMessage));
  }
  if (responseFuture == null) {
    return null;
  }
  Response<JsonElement> responseJson;
  try {
    responseJson=responseFuture.get(TIMEOUT,TimeUnit.MILLISECONDS);
    Response<R> response=MessageUtils.convertResponse(responseJson,resultClass);
    if (response.getSessionId() != null) {
      session.setSessionId(response.getSessionId());
    }
    return response;
  }
 catch (  InterruptedException e) {
    throw new KurentoException("String_Node_Str",e);
  }
catch (  ExecutionException e) {
    throw new KurentoException("String_Node_Str",e);
  }
catch (  TimeoutException e) {
    throw new TransportException("String_Node_Str" + TIMEOUT + "String_Node_Str",e);
  }
}

Fixed version (ground truth):
private <P,R>Response<R> internalSendRequestWebSocket(Request<P> request,Class<R> resultClass) throws IOException {
  connectIfNecessary();
  Future<Response<JsonElement>> responseFuture=null;
  if (request.getId() != null) {
    responseFuture=pendingRequests.prepareResponse(request.getId());
  }
  String jsonMessage=request.toString();
  log.debug("String_Node_Str",jsonMessage.trim());
synchronized (wsSession) {
    wsSession.sendMessage(new TextMessage(jsonMessage));
  }
  if (responseFuture == null) {
    return null;
  }
  Response<JsonElement> responseJson;
  try {
    responseJson=responseFuture.get(TIMEOUT,TimeUnit.MILLISECONDS);
    log.debug("String_Node_Str",responseJson.toString());
    Response<R> response=MessageUtils.convertResponse(responseJson,resultClass);
    if (response.getSessionId() != null) {
      session.setSessionId(response.getSessionId());
    }
    return response;
  }
 catch (  InterruptedException e) {
    throw new KurentoException("String_Node_Str",e);
  }
catch (  ExecutionException e) {
    throw new KurentoException("String_Node_Str",e);
  }
catch (  TimeoutException e) {
    throw new TransportException("String_Node_Str" + TIMEOUT + "String_Node_Str",e);
  }
}
Program: 36128
Project: 36128
Buggy source:
@Override public void run(){
  try {
    Response<JsonElement> result=internalSendRequestWebSocket(request,resultClass);
    try {
      continuation.onSuccess(result);
    }
 catch (    Exception e) {
      log.error("String_Node_Str",e);
    }
  }
 catch (  Exception e) {
    continuation.onError(e);
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    handlerManager.handleRequest(session,fromJsonRequest(message,JsonElement.class),rs);
  }
 catch (  IOException e) {
    log.warn("String_Node_Str" + message,e);
  }
}