nus-yam/ex-repair huggingface dataset:
Program: 10974
Project: 10974
Buggy source:
/** 
 * Update the "Go" button image.
 */
private void updateGoButton(){
  if (mCurrentWebView.isLoading()) {
    mGoButton.setImageResource(R.drawable.ic_btn_stop);
    mUrlEditText.setCompoundDrawablesWithIntrinsicBounds(new BitmapDrawable(mCurrentWebView.getFavicon()),null,mCircularProgress,null);
    ((AnimationDrawable)mCircularProgress).start();
  }
 else {
    mGoButton.setImageResource(R.drawable.ic_btn_go);
    mUrlEditText.setCompoundDrawablesWithIntrinsicBounds(new BitmapDrawable(mCurrentWebView.getFavicon()),null,null,null);
    ((AnimationDrawable)mCircularProgress).stop();
  }
}

Fixed version (ground truth):
/** 
 * Update the "Go" button image.
 */
private void updateGoButton(){
  if (mCurrentWebView.isLoading()) {
    mGoButton.setImageResource(R.drawable.ic_btn_stop);
    mUrlEditText.setCompoundDrawables(getNormalizedFavicon(),null,mCircularProgress,null);
    ((AnimationDrawable)mCircularProgress).start();
  }
 else {
    mGoButton.setImageResource(R.drawable.ic_btn_go);
    mUrlEditText.setCompoundDrawables(getNormalizedFavicon(),null,null,null);
    ((AnimationDrawable)mCircularProgress).stop();
  }
}
Program: 10977
Project: 10977
Buggy source:
public void visitMethodInsn(final int opcode,final String owner,final String name,final String desc){
  if (mv != null) {
    mv.visitMethodInsn(opcode,owner,name,desc);
  }
  pop(desc);
  if (opcode != Opcodes.INVOKESTATIC && opcode != Opcodes.INVOKEDYNAMIC) {
    Object t=pop();
    if (opcode == Opcodes.INVOKESPECIAL && name.charAt(0) == '<') {
      Object u;
      if (t == Opcodes.UNINITIALIZED_THIS) {
        u=owner;
      }
 else {
        u=uninitializedTypes.get(t);
      }
      for (int i=0; i < locals.size(); ++i) {
        if (locals.get(i) == t) {
          locals.set(i,u);
        }
      }
      for (int i=0; i < stack.size(); ++i) {
        if (stack.get(i) == t) {
          stack.set(i,u);
        }
      }
    }
  }
  pushDesc(desc);
  labels=null;
}

Fixed version (ground truth):
public void visitMethodInsn(final int opcode,final String owner,final String name,final String desc){
  if (mv != null) {
    mv.visitMethodInsn(opcode,owner,name,desc);
  }
  if (this.locals == null) {
    labels=null;
    return;
  }
  pop(desc);
  if (opcode != Opcodes.INVOKESTATIC && opcode != Opcodes.INVOKEDYNAMIC) {
    Object t=pop();
    if (opcode == Opcodes.INVOKESPECIAL && name.charAt(0) == '<') {
      Object u;
      if (t == Opcodes.UNINITIALIZED_THIS) {
        u=this.owner;
      }
 else {
        u=uninitializedTypes.get(t);
      }
      for (int i=0; i < locals.size(); ++i) {
        if (locals.get(i) == t) {
          locals.set(i,u);
        }
      }
      for (int i=0; i < stack.size(); ++i) {
        if (stack.get(i) == t) {
          stack.set(i,u);
        }
      }
    }
  }
  pushDesc(desc);
  labels=null;
}
Program: 10979
Project: 10979
Buggy source:
/** 
 * Creates a new   {@link AnalyzerAdapter}.
 * @param owner the owner's class name.
 * @param access the method's access flags (see {@link Opcodes}).
 * @param name the method's name.
 * @param desc the method's descriptor (see {@link Type Type}).
 * @param mv the method visitor to which this adapter delegates calls. Maybe <tt>null</tt>.
 */
public AnalyzerAdapter(final String owner,final int access,final String name,final String desc,final MethodVisitor mv){
  super(mv);
  locals=new ArrayList();
  stack=new ArrayList();
  uninitializedTypes=new HashMap();
  if ((access & Opcodes.ACC_STATIC) == 0) {
    if ("String_Node_Str".equals(name)) {
      locals.add(Opcodes.UNINITIALIZED_THIS);
    }
 else {
      locals.add(owner);
    }
  }
  Type[] types=Type.getArgumentTypes(desc);
  for (int i=0; i < types.length; ++i) {
    Type type=types[i];
switch (type.getSort()) {
case Type.BOOLEAN:
case Type.CHAR:
case Type.BYTE:
case Type.SHORT:
case Type.INT:
      locals.add(Opcodes.INTEGER);
    break;
case Type.FLOAT:
  locals.add(Opcodes.FLOAT);
break;
case Type.LONG:
locals.add(Opcodes.LONG);
locals.add(Opcodes.TOP);
break;
case Type.DOUBLE:
locals.add(Opcodes.DOUBLE);
locals.add(Opcodes.TOP);
break;
case Type.ARRAY:
locals.add(types[i].getDescriptor());
break;
default :
locals.add(types[i].getInternalName());
}
}
}

Fixed version (ground truth):
/** 
 * Creates a new   {@link AnalyzerAdapter}.
 * @param owner the owner's class name.
 * @param access the method's access flags (see {@link Opcodes}).
 * @param name the method's name.
 * @param desc the method's descriptor (see {@link Type Type}).
 * @param mv the method visitor to which this adapter delegates calls. Maybe <tt>null</tt>.
 */
public AnalyzerAdapter(final String owner,final int access,final String name,final String desc,final MethodVisitor mv){
  super(mv);
  this.owner=owner;
  locals=new ArrayList();
  stack=new ArrayList();
  uninitializedTypes=new HashMap();
  if ((access & Opcodes.ACC_STATIC) == 0) {
    if ("String_Node_Str".equals(name)) {
      locals.add(Opcodes.UNINITIALIZED_THIS);
    }
 else {
      locals.add(owner);
    }
  }
  Type[] types=Type.getArgumentTypes(desc);
  for (int i=0; i < types.length; ++i) {
    Type type=types[i];
switch (type.getSort()) {
case Type.BOOLEAN:
case Type.CHAR:
case Type.BYTE:
case Type.SHORT:
case Type.INT:
      locals.add(Opcodes.INTEGER);
    break;
case Type.FLOAT:
  locals.add(Opcodes.FLOAT);
break;
case Type.LONG:
locals.add(Opcodes.LONG);
locals.add(Opcodes.TOP);
break;
case Type.DOUBLE:
locals.add(Opcodes.DOUBLE);
locals.add(Opcodes.TOP);
break;
case Type.ARRAY:
locals.add(types[i].getDescriptor());
break;
default :
locals.add(types[i].getInternalName());
}
}
}
Program: 10980
Project: 10980
Buggy source:
public void visitLdcInsn(final Object cst){
  if (mv != null) {
    mv.visitLdcInsn(cst);
  }
  if (cst instanceof Integer) {
    push(Opcodes.INTEGER);
  }
 else   if (cst instanceof Long) {
    push(Opcodes.LONG);
    push(Opcodes.TOP);
  }
 else   if (cst instanceof Float) {
    push(Opcodes.FLOAT);
  }
 else   if (cst instanceof Double) {
    push(Opcodes.DOUBLE);
    push(Opcodes.TOP);
  }
 else   if (cst instanceof String) {
    push("String_Node_Str");
  }
 else   if (cst instanceof Type) {
    push("String_Node_Str");
  }
 else {
    throw new IllegalArgumentException();
  }
  labels=null;
}

Fixed version (ground truth):
public void visitLdcInsn(final Object cst){
  if (mv != null) {
    mv.visitLdcInsn(cst);
  }
  if (this.locals == null) {
    labels=null;
    return;
  }
  if (cst instanceof Integer) {
    push(Opcodes.INTEGER);
  }
 else   if (cst instanceof Long) {
    push(Opcodes.LONG);
    push(Opcodes.TOP);
  }
 else   if (cst instanceof Float) {
    push(Opcodes.FLOAT);
  }
 else   if (cst instanceof Double) {
    push(Opcodes.DOUBLE);
    push(Opcodes.TOP);
  }
 else   if (cst instanceof String) {
    push("String_Node_Str");
  }
 else   if (cst instanceof Type) {
    push("String_Node_Str");
  }
 else {
    throw new IllegalArgumentException();
  }
  labels=null;
}
Program: 10981
Project: 10981
Buggy source:
@Override public void beforeReadAccess(Object obj,long field){
  ReadFieldAccess next=readSet.getNext();
  currentReadFieldAccess=next;
  next.init(obj,field);
  lastReadLock=LockTable.checkLock(next.hashCode(),localClock);
}

Fixed version (ground truth):
@Override public void beforeReadAccess(Object obj,long field){
  ReadFieldAccess next=readSet.getNext();
  currentReadFieldAccess=next;
  next.init(obj,field);
  lastReadLock=LockTable.checkLock(next.hashCode(),localClock,locksMarker);
}
Program: 10982
Project: 10982
Buggy source:
@Override public boolean commit(){
  try {
    if (writeSet.isEmpty())     return true;
    try {
      writeSet.forEach(lockProcedure);
      readSet.checkClock(localClock);
    }
 catch (    TransactionException exception) {
      lockProcedure.unlockAll();
      return false;
    }
    writeSet.forEach(putProcedure);
    lockProcedure.setAndUnlockAll();
    return true;
  }
  finally {
    if (irrevocableState) {
      irrevocableState=false;
      irrevocableAccessLock.writeLock().unlock();
    }
 else {
      irrevocableAccessLock.readLock().unlock();
    }
  }
}

Fixed version (ground truth):
@Override public boolean commit(){
  try {
    if (writeSet.isEmpty())     return true;
    try {
      writeSet.forEach(lockProcedure);
      readSet.checkClock(localClock,locksMarker);
    }
 catch (    TransactionException exception) {
      lockProcedure.unlockAll();
      return false;
    }
    writeSet.forEach(putProcedure);
    lockProcedure.setAndUnlockAll();
    return true;
  }
  finally {
    if (irrevocableState) {
      irrevocableState=false;
      irrevocableAccessLock.writeLock().unlock();
    }
 else {
      irrevocableAccessLock.readLock().unlock();
    }
  }
}
Program: 10983
Project: 10983
Buggy source:
public void checkClock(int clock){
  for (int i=0; i < nextAvaliable; i++) {
    LockTable.checkLock(readSet[i].hashCode(),clock);
    readSet[i].clear();
  }
}

Fixed version (ground truth):
public void checkClock(int clock,byte[] contextLocks){
  for (int i=0; i < nextAvaliable; i++) {
    LockTable.checkLock(readSet[i].hashCode(),clock,contextLocks);
    readSet[i].clear();
  }
}
Program: 10984
Project: 10984
Buggy source:
public void visitMethodInsn(final int opcode,final String owner,final String name,final String desc){
  if (mv != null) {
    mv.visitMethodInsn(opcode,owner,name,desc);
  }
  pop(desc);
  if (opcode != Opcodes.INVOKESTATIC && opcode != Opcodes.INVOKEDYNAMIC) {
    Object t=pop();
    if (opcode == Opcodes.INVOKESPECIAL && name.charAt(0) == '<') {
      Object u;
      if (t == Opcodes.UNINITIALIZED_THIS) {
        u=owner;
      }
 else {
        u=uninitializedTypes.get(t);
      }
      for (int i=0; i < locals.size(); ++i) {
        if (locals.get(i) == t) {
          locals.set(i,u);
        }
      }
      for (int i=0; i < stack.size(); ++i) {
        if (stack.get(i) == t) {
          stack.set(i,u);
        }
      }
    }
  }
  pushDesc(desc);
  labels=null;
}

Fixed version (ground truth):
public void visitMethodInsn(final int opcode,final String owner,final String name,final String desc){
  if (mv != null) {
    mv.visitMethodInsn(opcode,owner,name,desc);
  }
  if (this.locals == null) {
    labels=null;
    return;
  }
  pop(desc);
  if (opcode != Opcodes.INVOKESTATIC && opcode != Opcodes.INVOKEDYNAMIC) {
    Object t=pop();
    if (opcode == Opcodes.INVOKESPECIAL && name.charAt(0) == '<') {
      Object u;
      if (t == Opcodes.UNINITIALIZED_THIS) {
        u=this.owner;
      }
 else {
        u=uninitializedTypes.get(t);
      }
      for (int i=0; i < locals.size(); ++i) {
        if (locals.get(i) == t) {
          locals.set(i,u);
        }
      }
      for (int i=0; i < stack.size(); ++i) {
        if (stack.get(i) == t) {
          stack.set(i,u);
        }
      }
    }
  }
  pushDesc(desc);
  labels=null;
}
Program: 10986
Project: 10986
Buggy source:
/** 
 * Creates a new   {@link AnalyzerAdapter}.
 * @param owner the owner's class name.
 * @param access the method's access flags (see {@link Opcodes}).
 * @param name the method's name.
 * @param desc the method's descriptor (see {@link Type Type}).
 * @param mv the method visitor to which this adapter delegates calls. Maybe <tt>null</tt>.
 */
public AnalyzerAdapter(final String owner,final int access,final String name,final String desc,final MethodVisitor mv){
  super(mv);
  locals=new ArrayList();
  stack=new ArrayList();
  uninitializedTypes=new HashMap();
  if ((access & Opcodes.ACC_STATIC) == 0) {
    if ("String_Node_Str".equals(name)) {
      locals.add(Opcodes.UNINITIALIZED_THIS);
    }
 else {
      locals.add(owner);
    }
  }
  Type[] types=Type.getArgumentTypes(desc);
  for (int i=0; i < types.length; ++i) {
    Type type=types[i];
switch (type.getSort()) {
case Type.BOOLEAN:
case Type.CHAR:
case Type.BYTE:
case Type.SHORT:
case Type.INT:
      locals.add(Opcodes.INTEGER);
    break;
case Type.FLOAT:
  locals.add(Opcodes.FLOAT);
break;
case Type.LONG:
locals.add(Opcodes.LONG);
locals.add(Opcodes.TOP);
break;
case Type.DOUBLE:
locals.add(Opcodes.DOUBLE);
locals.add(Opcodes.TOP);
break;
case Type.ARRAY:
locals.add(types[i].getDescriptor());
break;
default :
locals.add(types[i].getInternalName());
}
}
}

Fixed version (ground truth):
/** 
 * Creates a new   {@link AnalyzerAdapter}.
 * @param owner the owner's class name.
 * @param access the method's access flags (see {@link Opcodes}).
 * @param name the method's name.
 * @param desc the method's descriptor (see {@link Type Type}).
 * @param mv the method visitor to which this adapter delegates calls. Maybe <tt>null</tt>.
 */
public AnalyzerAdapter(final String owner,final int access,final String name,final String desc,final MethodVisitor mv){
  super(mv);
  this.owner=owner;
  locals=new ArrayList();
  stack=new ArrayList();
  uninitializedTypes=new HashMap();
  if ((access & Opcodes.ACC_STATIC) == 0) {
    if ("String_Node_Str".equals(name)) {
      locals.add(Opcodes.UNINITIALIZED_THIS);
    }
 else {
      locals.add(owner);
    }
  }
  Type[] types=Type.getArgumentTypes(desc);
  for (int i=0; i < types.length; ++i) {
    Type type=types[i];
switch (type.getSort()) {
case Type.BOOLEAN:
case Type.CHAR:
case Type.BYTE:
case Type.SHORT:
case Type.INT:
      locals.add(Opcodes.INTEGER);
    break;
case Type.FLOAT:
  locals.add(Opcodes.FLOAT);
break;
case Type.LONG:
locals.add(Opcodes.LONG);
locals.add(Opcodes.TOP);
break;
case Type.DOUBLE:
locals.add(Opcodes.DOUBLE);
locals.add(Opcodes.TOP);
break;
case Type.ARRAY:
locals.add(types[i].getDescriptor());
break;
default :
locals.add(types[i].getInternalName());
}
}
}
Program: 10987
Project: 10987
Buggy source:
public void visitLdcInsn(final Object cst){
  if (mv != null) {
    mv.visitLdcInsn(cst);
  }
  if (cst instanceof Integer) {
    push(Opcodes.INTEGER);
  }
 else   if (cst instanceof Long) {
    push(Opcodes.LONG);
    push(Opcodes.TOP);
  }
 else   if (cst instanceof Float) {
    push(Opcodes.FLOAT);
  }
 else   if (cst instanceof Double) {
    push(Opcodes.DOUBLE);
    push(Opcodes.TOP);
  }
 else   if (cst instanceof String) {
    push("String_Node_Str");
  }
 else   if (cst instanceof Type) {
    push("String_Node_Str");
  }
 else {
    throw new IllegalArgumentException();
  }
  labels=null;
}

Fixed version (ground truth):
public void visitLdcInsn(final Object cst){
  if (mv != null) {
    mv.visitLdcInsn(cst);
  }
  if (this.locals == null) {
    labels=null;
    return;
  }
  if (cst instanceof Integer) {
    push(Opcodes.INTEGER);
  }
 else   if (cst instanceof Long) {
    push(Opcodes.LONG);
    push(Opcodes.TOP);
  }
 else   if (cst instanceof Float) {
    push(Opcodes.FLOAT);
  }
 else   if (cst instanceof Double) {
    push(Opcodes.DOUBLE);
    push(Opcodes.TOP);
  }
 else   if (cst instanceof String) {
    push("String_Node_Str");
  }
 else   if (cst instanceof Type) {
    push("String_Node_Str");
  }
 else {
    throw new IllegalArgumentException();
  }
  labels=null;
}
Program: 10988
Project: 10988
Buggy source:
private final WriteFieldAccess onReadAccess0(Object obj,long field){
  ReadFieldAccess current=readSet.getCurrent();
  int hash=current.hashCode();
  long lock=LockTable.getLock(hash);
  int version=LockTable.getVersion(lock);
  while (LockTable.isLocked(lock)) {
    int lockOwner=LockTable.getOwner(lock);
    Context ownerCtx=threads[lockOwner];
    Action action=cm.resolveReadConflict(current,this,ownerCtx);
    if (action.equals(Action.RESTART)) {
      stats.reportAbort(AbortType.SPECULATION_LOCATION_LOCKED);
      throw FAILURE_EXCEPTION;
    }
    if (action.equals(Action.RETRY)) {
      lock=LockTable.getLock(hash);
      continue;
    }
    if (action.equals(Action.CONTINUE)) {
      break;
    }
  }
  if (version > lastReadLockVersion) {
    stats.reportAbort(AbortType.SPECULATION_READVERSION);
    throw FAILURE_EXCEPTION;
  }
  if (cm.requiresPriorities()) {
    karma.incrementAndGet();
  }
  cm.init();
  return writeSet.contains(current);
}

Fixed version (ground truth):
private final WriteFieldAccess onReadAccess0(Object obj,long field){
  ReadFieldAccess current=readSet.getCurrent();
  int hash=current.hashCode();
  long lock=LockTable.getLock(hash);
  while (LockTable.isLocked(lock)) {
    int lockOwner=LockTable.getOwner(lock);
    Context ownerCtx=threads[lockOwner];
    Action action=cm.resolveReadConflict(current,this,ownerCtx);
    if (action.equals(Action.RESTART)) {
      stats.reportAbort(AbortType.SPECULATION_LOCATION_LOCKED);
      throw FAILURE_EXCEPTION;
    }
    if (action.equals(Action.RETRY)) {
      lock=LockTable.getLock(hash);
      continue;
    }
    if (action.equals(Action.CONTINUE)) {
      break;
    }
  }
  int version=LockTable.getVersion(lock);
  if (version > lastReadLockVersion) {
    stats.reportAbort(AbortType.SPECULATION_READVERSION);
    throw FAILURE_EXCEPTION;
  }
  if (cm.requiresPriorities()) {
    karma.incrementAndGet();
  }
  cm.init();
  return writeSet.contains(current);
}
Program: 10989
Project: 10989
Buggy source:
public double onReadAccess(Object obj,double value,long field){
  Object v=onReadAccess(obj,field,Type.DOUBLE);
  return (v == null ? value : ((Number)v).doubleValue());
}

Fixed version (ground truth):
public double onReadAccess(Object obj,double value,long field){
  return (onReadAccess(obj,field,Type.DOUBLE) ? ((Number)readValue).doubleValue() : value);
}
Program: 10990
Project: 10990
Buggy source:
public Object get(int hash,Object obj,long field){
  WriteFieldAccess w=entries.get(hash);
  while (w != null) {
    if (w.getReference() == obj && w.getField() == field)     return w.getValue();
    w=w.getNext();
  }
  return null;
}

Fixed version (ground truth):
public WriteFieldAccess get(int hash,Object obj,long field){
  WriteFieldAccess w=entries.get(hash);
  while (w != null) {
    if (w.getReference() == obj && w.getField() == field)     return w;
    w=w.getNext();
  }
  return null;
}
Program: 10991
Project: 10991
Buggy source:
@Atomic public boolean remove(int value){
  boolean result;
  Node[] update=new Node[m_maxLevel + 1];
  Node node=m_head;
  for (int i=m_level; i >= 0; i--) {
    Node next=node.getForward(i);
    while (next.getValue() < value) {
      node=next;
      next=node.getForward(i);
    }
    update[i]=node;
  }
  node=node.getForward(0);
  if (node.getValue() != value) {
    result=false;
  }
 else {
    for (int i=0; i <= m_level; i++) {
      if (update[i].getForward(i) == node)       update[i].setForward(i,node.getForward(i));
    }
    while (m_level > 0 && m_head.getForward(m_level) == m_head)     m_level--;
    result=true;
  }
  return result;
}

Fixed version (ground truth):
@Atomic public boolean remove(int value){
  boolean result;
  Node[] update=new Node[m_maxLevel + 1];
  Node node=m_head;
  for (int i=m_level; i >= 0; i--) {
    Node next=node.getForward(i);
    while (next.getValue() < value) {
      node=next;
      next=node.getForward(i);
    }
    update[i]=node;
  }
  node=node.getForward(0);
  if (node.getValue() != value) {
    result=false;
  }
 else {
    for (int i=0; i <= m_level; i++) {
      if (update[i].getForward(i) == node)       update[i].setForward(i,node.getForward(i));
    }
    while (m_level > 0 && m_head.getForward(m_level).getForward(0) == null)     m_level--;
    result=true;
  }
  return result;
}
Program: 10994
Project: 10994
Buggy source:
public OMSVGPaint(short paintType){
  this.paintType=paintType;
}

Fixed version (ground truth):
public OMSVGPaint(short paintType){
  this.paintType=paintType;
switch (paintType) {
case SVG_PAINTTYPE_NONE:
    cssText=SVGConstants.CSS_NONE_VALUE;
  break;
case SVG_PAINTTYPE_CURRENTCOLOR:
cssText=SVGConstants.CSS_CURRENTCOLOR_VALUE;
colorType=SVG_COLORTYPE_CURRENTCOLOR;
break;
}
}
Program: 10996
Project: 10996
Buggy source:
/** 
 * Clears the value of a named property, causing it to  revert to its default.
 * @param name The property name
 */
public final native void clearSVGProperty(String name);

Fixed version (ground truth):
/** 
 * Clears the value of a named property, causing it to  revert to its default.
 * @param name The property name
 */
public final void clearSVGProperty(String name){
  setPropertyImpl(name,"String_Node_Str");
}
Program: 10997
Project: 10997
Buggy source:
private static final short unitToCode(com.google.gwt.dom.client.Style.Unit unit){
switch (unit) {
case PCT:
    return SVG_LENGTHTYPE_PERCENTAGE;
case EM:
  return SVG_LENGTHTYPE_EMS;
case EX:
return SVG_LENGTHTYPE_EXS;
case PX:
return SVG_LENGTHTYPE_PX;
case CM:
return SVG_LENGTHTYPE_CM;
case MM:
return SVG_LENGTHTYPE_MM;
case IN:
return SVG_LENGTHTYPE_IN;
case PT:
return SVG_LENGTHTYPE_PT;
case PC:
return SVG_LENGTHTYPE_PC;
}
return SVG_LENGTHTYPE_NUMBER;
}

Fixed version (ground truth):
private static final short unitToCode(com.google.gwt.dom.client.Style.Unit unit){
  if (unit != null) {
switch (unit) {
case PCT:
      return SVG_LENGTHTYPE_PERCENTAGE;
case EM:
    return SVG_LENGTHTYPE_EMS;
case EX:
  return SVG_LENGTHTYPE_EXS;
case PX:
return SVG_LENGTHTYPE_PX;
case CM:
return SVG_LENGTHTYPE_CM;
case MM:
return SVG_LENGTHTYPE_MM;
case IN:
return SVG_LENGTHTYPE_IN;
case PT:
return SVG_LENGTHTYPE_PT;
case PC:
return SVG_LENGTHTYPE_PC;
}
}
return SVG_LENGTHTYPE_NUMBER;
}
Program: 10998
Project: 10998
Buggy source:
/** 
 * Evaluates the specified XPath expression and returns the matching   {@link com.google.gwt.dom.client.Node} node.The expression must evaluate to a single node.
 * @param root The element the expression is rooted at
 * @param expr The XPath expression
 * @param resolver A prefix resolver if the expression has prefix
 * @return The selected node, or null if no such node exists.
 */
public static <T extends Node>T evaluateNodeXPath(Element root,String expr,XPathPrefixResolver resolver){
  return evaluateNodeXPath_(root,expr,resolver);
}

Fixed version (ground truth):
/** 
 * Evaluates the specified XPath expression and returns the matching   {@link com.google.gwt.dom.client.Node} node.The expression must evaluate to a single node.
 * @param root The element the expression is rooted at
 * @param expr The XPath expression
 * @param resolver A prefix resolver if the expression has prefix
 * @return The selected node, or null if no such node exists.
 */
public static <T extends Node>T evaluateNodeXPath(Element root,String expr,XPathPrefixResolver resolver){
  return (T)evaluateNodeXPath_(root,expr,resolver);
}
Program: 10999
Project: 10999
Buggy source:
private static native <T extends Node>T evaluateNodeXPath_(Element svgElement,String expr,XPathPrefixResolver resolver);

Fixed version (ground truth):
private static native Node evaluateNodeXPath_(Element svgElement,String expr,XPathPrefixResolver resolver);
Program: 11000
Project: 11000
Buggy source:
public void setSvgElement(OMSVGSVGElement svgElement){
  this.svgElement=svgElement;
  Node firstChild=div.getFirstChild();
  Element svg=this.svgElement.getElement();
  if (firstChild == null) {
    div.appendChild(svg);
  }
 else   if (firstChild != svg) {
    div.replaceChild(svg,firstChild);
  }
}

Fixed version (ground truth):
public void setSvgElement(OMSVGSVGElement svgElement){
  this.svgElement=(OMSVGSVGElement)svgElement.cloneNode(true);
  Node firstChild=div.getFirstChild();
  Element svg=this.svgElement.getElement();
  if (firstChild == null) {
    div.appendChild(svg);
  }
 else   if (firstChild != svg) {
    div.replaceChild(svg,firstChild);
  }
}
Program: 11001
Project: 11001
Buggy source:
public void setSvgElement(OMSVGSVGElement svgElement){
  this.svgElement=(OMSVGSVGElement)svgElement.cloneNode(true);
  Node firstChild=div.getFirstChild();
  Element svg=this.svgElement.getElement();
  if (firstChild == null) {
    div.appendChild(svg);
  }
 else   if (firstChild != svg) {
    div.replaceChild(svg,firstChild);
  }
}

Fixed version (ground truth):
public void setSvgElement(OMSVGSVGElement svgElement){
  this.svgElement=svgElement;
  Node firstChild=div.getFirstChild();
  Element svg=this.svgElement.getElement();
  if (firstChild == null) {
    div.appendChild(svg);
  }
 else   if (firstChild != svg) {
    div.replaceChild(svg,firstChild);
  }
}
Program: 11002
Project: 11002
Buggy source:
/** 
 * Parse the supplied SVG text into a document
 * @param rawSvg raw xml to be parsed
 * @return the document resulting from the parse
 */
public static final OMSVGSVGElement parse(String rawSvg){
  SVGDocument doc=impl.parseFromString(rawSvg,"String_Node_Str").cast();
  SVGSVGElement svg=DOMHelper.importNode(DOMHelper.getCurrentDocument(),doc.getDocumentElement(),true).cast();
  return new OMSVGSVGElement(svg);
}

Fixed version (ground truth):
/** 
 * Parse the supplied SVG text into a document
 * @param rawSvg raw xml to be parsed
 * @return the document resulting from the parse
 */
public static final OMSVGSVGElement parse(String rawSvg){
  SVGDocument doc=impl.parseFromString(rawSvg,"String_Node_Str").cast();
  SVGSVGElement svg=DOMHelper.importNode(DOMHelper.getCurrentDocument(),doc.getDocumentElement(),true).cast();
  operaFix(svg);
  return new OMSVGSVGElement(svg);
}
Program: 11003
Project: 11003
Buggy source:
private int popupExit(){
  int choix;
  choix=GUIUtilities.question_YES_NO(Utilities.getLangueMessage(Constantes.MESSAGE_FERMER_LOGICIEL));
  if (choix == JOptionPane.NO_OPTION)   choix=JOptionPane.CANCEL_OPTION;
  if (choix == JOptionPane.YES_OPTION) {
    if (this.fileName != null) {
      choix=GUIUtilities.question_YES_NO_CANCEL(Utilities.getLangueMessage(Constantes.MESSAGE_SAUVEGARDER_FICHIER_ENCOURS));
      if (choix == JOptionPane.YES_OPTION)       save();
    }
  }
  return choix;
}

Fixed version (ground truth):
private int popupExit(){
  int choix;
  choix=GUIUtilities.question_YES_NO(Utilities.getLangueMessage(Constantes.MESSAGE_FERMER_LOGICIEL));
  if (choix == JOptionPane.YES_OPTION) {
    if (this.fileName != null) {
      choix=GUIUtilities.question_YES_NO_CANCEL(Utilities.getLangueMessage(Constantes.MESSAGE_SAUVEGARDER_FICHIER_ENCOURS));
      if (choix == JOptionPane.YES_OPTION)       save();
    }
  }
 else {
    choix=JOptionPane.CANCEL_OPTION;
  }
  return choix;
}
Program: 11004
Project: 11004
Buggy source:
public static void show(Activity activity,JSONArray data){
  JSONObject dataObj=null;
  String text="String_Node_Str";
  try {
    dataObj=data.getJSONObject(0);
  }
 catch (  JSONException e) {
    dataObj=null;
  }
  if (dataObj != null) {
    if (dataObj.has("String_Node_Str")) {
      try {
        text=(String)dataObj.get("String_Node_Str");
      }
 catch (      JSONException e) {
      }
    }
  }
  final String labelText=text;
  final Activity _ctx=activity;
  if (!isVisible) {
    Log.i("String_Node_Str","String_Node_Str");
    activity.runOnUiThread(new Runnable(){
      public void run(){
        pd=ProgressDialog.show(_ctx,null,labelText,true,false);
      }
    }
);
    isVisible=true;
  }
}

Fixed version (ground truth):
public static void show(Activity activity,JSONArray data){
  JSONObject dataObj=null;
  String text="String_Node_Str";
  try {
    dataObj=data.getJSONObject(0);
  }
 catch (  JSONException e) {
    dataObj=null;
  }
  if (dataObj != null) {
    if (dataObj.has("String_Node_Str")) {
      Log.i(TAG,"String_Node_Str");
      try {
        text=(String)dataObj.get("String_Node_Str");
      }
 catch (      JSONException e) {
      }
    }
 else     if (dataObj.has("String_Node_Str")) {
      try {
        text=(String)dataObj.get("String_Node_Str");
      }
 catch (      JSONException e) {
      }
    }
  }
  final String labelText=text;
  final Activity _ctx=activity;
  if (!isVisible) {
    Log.i("String_Node_Str","String_Node_Str");
    activity.runOnUiThread(new Runnable(){
      public void run(){
        pd=ProgressDialog.show(_ctx,null,labelText,true,false);
      }
    }
);
    isVisible=true;
  }
}
Program: 11005
Project: 11005
Buggy source:
public static void show(Activity activity,JSONArray data){
  JSONObject dataObj=null;
  String text="String_Node_Str";
  try {
    dataObj=data.getJSONObject(0);
  }
 catch (  JSONException e) {
    dataObj=null;
  }
  if (dataObj != null) {
    if (dataObj.has("String_Node_Str")) {
      try {
        text=(String)dataObj.get("String_Node_Str");
      }
 catch (      JSONException e) {
      }
    }
  }
  final String labelText=text;
  final Activity _ctx=activity;
  if (!isVisible) {
    Log.i("String_Node_Str","String_Node_Str");
    activity.runOnUiThread(new Runnable(){
      public void run(){
        pd=ProgressDialog.show(_ctx,null,labelText,true,false);
      }
    }
);
    isVisible=true;
  }
}

Fixed version (ground truth):
public static void show(Activity activity,JSONArray data){
  JSONObject dataObj=null;
  String text="String_Node_Str";
  try {
    dataObj=data.getJSONObject(0);
  }
 catch (  JSONException e) {
    dataObj=null;
  }
  if (dataObj != null) {
    if (dataObj.has("String_Node_Str")) {
      Log.i(TAG,"String_Node_Str");
      try {
        text=(String)dataObj.get("String_Node_Str");
      }
 catch (      JSONException e) {
      }
    }
 else     if (dataObj.has("String_Node_Str")) {
      try {
        text=(String)dataObj.get("String_Node_Str");
      }
 catch (      JSONException e) {
      }
    }
  }
  final String labelText=text;
  final Activity _ctx=activity;
  if (!isVisible) {
    Log.i("String_Node_Str","String_Node_Str");
    activity.runOnUiThread(new Runnable(){
      public void run(){
        pd=ProgressDialog.show(_ctx,null,labelText,true,false);
      }
    }
);
    isVisible=true;
  }
}
Program: 11006
Project: 11006
Buggy source:
@Override public String getNodeName(){
  LOG.info("String_Node_Str");
  try {
    String jbossNodeName=System.getProperty("String_Node_Str");
    return jbossNodeName != null ? jbossNodeName : InetAddress.getLocalHost().getHostName();
  }
 catch (  UnknownHostException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
public String getNodeName(){
  LOG.info("String_Node_Str");
  try {
    String jbossNodeName=System.getProperty("String_Node_Str");
    return jbossNodeName != null ? jbossNodeName : InetAddress.getLocalHost().getHostName();
  }
 catch (  UnknownHostException e) {
    throw new RuntimeException(e);
  }
}
Program: 11007
Project: 11007
Buggy source:
/** 
 * Swap the front and back buffers, giving access to the newly updated data for drawing
 */
private void swapBuffers(){
synchronized (pathBufferLock) {
    DoubleBuffer tmp=pathVertexFrontBuffer;
    pathVertexFrontBuffer=pathVertexBackBuffer;
    pathVertexBackBuffer=tmp;
    pathVertexFrontBuffer.rewind();
    tmp=pathColourFrontBuffer;
    pathColourFrontBuffer=pathColourBackBuffer;
    pathColourBackBuffer=tmp;
    pathColourFrontBuffer.rewind();
  }
}

Fixed version (ground truth):
/** 
 * Swap the front and back buffers, giving access to the newly updated data for drawing
 */
private void swapBuffers(){
synchronized (pathBufferLock) {
    DoubleBuffer tmp=pathVertexFrontBuffer;
    pathVertexFrontBuffer=pathVertexBackBuffer;
    pathVertexBackBuffer=tmp;
    pathVertexFrontBuffer.rewind();
    tmp=pathColourFrontBuffer;
    pathColourFrontBuffer=pathColourBackBuffer;
    pathColourBackBuffer=tmp;
    pathColourFrontBuffer.rewind();
    pathReferenceCenterFront=pathReferenceCenterBack;
  }
}
Program: 11010
Project: 11010
Buggy source:
private void validateProperties(){
  Validate.isTrue(esize == 4,"String_Node_Str" + esize);
  Validate.isTrue("String_Node_Str".equals(format),"String_Node_Str" + format);
  Validate.isTrue("String_Node_Str".equals(etype) || "String_Node_Str".equals(etype),"String_Node_Str" + etype);
}

Fixed version (ground truth):
private void validateProperties(){
  Validate.isTrue("String_Node_Str".equals(format),"String_Node_Str" + format);
  Validate.isTrue("String_Node_Str".equals(etype) || "String_Node_Str".equals(etype),"String_Node_Str" + etype);
}
Program: 11012
Project: 11012
Buggy source:
/** 
 * Add a hole to the current shape. The hole must be fully within both the current shape and this tile's sector.
 * @param points Points involved in the hole
 * @param attributes Shape attributes
 */
public void addHole(List<Coordinate> points,Attributes attributes){
  if (current == null)   throw new IllegalStateException("String_Node_Str" + this + "String_Node_Str");
  TileRecord hole=new TileRecord(-1,false,attributes,points);
  current.holes.add(hole);
}

Fixed version (ground truth):
/** 
 * Add a hole to the current shape. The hole must be fully within both the current shape and this tile's sector.
 * @param points Points involved in the hole
 * @param attributes Shape attributes
 */
public void addHole(List<Coordinate> points,Attributes attributes){
  if (current == null && !filled)   throw new IllegalStateException("String_Node_Str" + this + "String_Node_Str");
  TileRecord hole=new TileRecord(-1,false,attributes,points);
  if (current != null)   current.holes.add(hole);
 else   filledHoles.add(hole);
}
Program: 11014
Project: 11014
Buggy source:
/** 
 * Fill the tile's sector with a square polygon.
 */
protected void fillSector(){
  TileRecord current=new TileRecord(-1,false,filledAttributes);
  records.add(current);
  current.exited=false;
  for (  Coordinate c : clockwise)   current.coordinates.add(c);
}

Fixed version (ground truth):
/** 
 * Fill the tile's sector with a square polygon.
 */
protected void fillSector(){
  TileRecord record=new TileRecord(-1,false,filledAttributes);
  records.add(record);
  record.exited=false;
  for (  Coordinate c : clockwise)   record.coordinates.add(c);
  record.holes.addAll(filledHoles);
}
Program: 11015
Project: 11015
Buggy source:
@Override public boolean buildVerts(DrawContext dc,RectTile tile,boolean makeSkirts){
  ((RowColRectTile)tile).rebuiltVertices=true;
  return super.buildVerts(dc,tile,false);
}

Fixed version (ground truth):
@Override public boolean buildVerts(DrawContext dc,RectTile tile,boolean makeSkirts){
  ((RowColRectTile)tile).rebuiltVertices=true;
  return super.buildVerts(dc,tile,makeSkirts);
}
Program: 11016
Project: 11016
Buggy source:
@Override public void renderTiles(DrawContext dc,Iterable<? extends SurfaceTile> tiles){
  ExtendedDrawContext.applyWireframePolygonMode(dc);
  if (ignoreElevation && dc instanceof ExtendedDrawContext) {
    try {
      ((ExtendedDrawContext)dc).switchToFlatSurfaceGeometry();
      super.renderTiles(dc,tiles);
    }
  finally {
      ((ExtendedDrawContext)dc).switchToStandardSurfaceGeometry();
    }
  }
 else {
    super.renderTiles(dc,tiles);
  }
}

Fixed version (ground truth):
@Override public synchronized void renderTiles(DrawContext dc,Iterable<? extends SurfaceTile> tiles){
  ExtendedDrawContext.applyWireframePolygonMode(dc);
  if (ignoreElevation && dc instanceof ExtendedDrawContext) {
    try {
      ((ExtendedDrawContext)dc).switchToFlatSurfaceGeometry();
      super.renderTiles(dc,tiles);
    }
  finally {
      ((ExtendedDrawContext)dc).switchToStandardSurfaceGeometry();
    }
  }
 else {
    super.renderTiles(dc,tiles);
  }
}
Program: 11017
Project: 11017
Buggy source:
@Override public SectorGeometryList tessellate(DrawContext dc){
  SectorGeometryList currentTiles=super.tessellate(dc);
  if (isMakeTileSkirts() && smartSkirts) {
    Map<RectTileKey,RowColRectTile> tileMap=new HashMap<RectTileKey,RowColRectTile>();
    for (    SectorGeometry t : currentTiles) {
      RowColRectTile tile=(RowColRectTile)t;
      RectTileKey tileKey=new RectTileKey(tile.getLevel(),tile.getRow(),tile.getColumn());
      tileMap.put(tileKey,tile);
    }
    for (    SectorGeometry tile : currentTiles) {
      fixSkirts(dc,(RowColRectTile)tile,tileMap);
    }
  }
  return currentTiles;
}

Fixed version (ground truth):
@Override public synchronized SectorGeometryList tessellate(DrawContext dc){
  SectorGeometryList currentTiles=super.tessellate(dc);
  if (isMakeTileSkirts() && smartSkirts) {
    Map<RectTileKey,RowColRectTile> tileMap=new HashMap<RectTileKey,RowColRectTile>();
    for (    SectorGeometry t : currentTiles) {
      RowColRectTile tile=(RowColRectTile)t;
      RectTileKey tileKey=new RectTileKey(tile.getLevel(),tile.getRow(),tile.getColumn());
      tileMap.put(tileKey,tile);
    }
    for (    SectorGeometry tile : currentTiles) {
      fixSkirts(dc,(RowColRectTile)tile,tileMap);
    }
  }
  return currentTiles;
}
Program: 11018
Project: 11018
Buggy source:
public ExtendedSceneController(){
  dc.dispose();
  VerticalExaggerationService.INSTANCE.addListener(this);
  setVerticalExaggeration(VerticalExaggerationService.INSTANCE.get());
}

Fixed version (ground truth):
public ExtendedSceneController(){
  dc=wrapDrawContext(dc);
  VerticalExaggerationService.INSTANCE.addListener(this);
  setVerticalExaggeration(VerticalExaggerationService.INSTANCE.get());
}
Program: 11021
Project: 11021
Buggy source:
@Override public void valueChanged(TreeSelectionEvent event){
  IData selected=getSelectedData(event.getPath());
  if (selected == null)   return;
  addAction.setEnabled(false);
  removeAction.setEnabled(false);
  if (selected instanceof ILayerDefinition) {
    ILayerDefinition layer=(ILayerDefinition)selected;
    if (layerTreeModel.containsLayer(layer))     removeAction.setEnabled(true);
 else     addAction.setEnabled(true);
    addAllAction.setEnabled(false);
  }
 else {
    addAllAction.setEnabled(true);
  }
}

Fixed version (ground truth):
@Override public void valueChanged(TreeSelectionEvent event){
  IData selected=getSelectedData(event.getPath());
  enableActions(selected);
}
Program: 11023
Project: 11023
Buggy source:
@Override public void run(){
  tree.repaint();
}

Fixed version (ground truth):
@Override public void run(){
  tree.repaint();
  enableActions();
}
Program: 11024
Project: 11024
Buggy source:
@Override public void actionPerformed(ActionEvent e){
  final TreePath path=tree.getSelectionPath();
  final IData selected=getSelectedData(path);
  if (selected != null) {
    int choice=JOptionPane.showConfirmDialog(DatasetPanel.this,"String_Node_Str","String_Node_Str",JOptionPane.YES_NO_OPTION,JOptionPane.WARNING_MESSAGE);
    if (choice == JOptionPane.YES_OPTION) {
      Thread thread=new Thread(new Runnable(){
        @Override public void run(){
          addAll(selected,path.getPath());
          SwingUtil.invokeLaterTaskOnEDT(new Runnable(){
            @Override public void run(){
              tree.repaint();
            }
          }
);
        }
      }
);
      thread.setDaemon(true);
      thread.start();
    }
  }
}

Fixed version (ground truth):
@Override public void actionPerformed(ActionEvent e){
  final TreePath path=tree.getSelectionPath();
  final IData selected=getSelectedData(path);
  if (selected != null) {
    int choice=JOptionPane.showConfirmDialog(DatasetPanel.this,"String_Node_Str","String_Node_Str",JOptionPane.YES_NO_OPTION,JOptionPane.WARNING_MESSAGE);
    if (choice == JOptionPane.YES_OPTION) {
      Thread thread=new Thread(new Runnable(){
        @Override public void run(){
          addAll(selected,path.getPath());
          SwingUtil.invokeLaterTaskOnEDT(new Runnable(){
            @Override public void run(){
              tree.repaint();
              enableActions();
            }
          }
);
        }
      }
);
      thread.setDaemon(true);
      thread.start();
    }
  }
}
Program: 11025
Project: 11025
Buggy source:
/** 
 * Show a new   {@link ProxyDialog}, and block until the user has completed.
 * @param parent Dialog's parent
 */
public static void show(Frame parent){
  ProxyDialog dialog=new ProxyDialog(parent);
  dialog.setVisible(true);
  if (dialog.response != JOptionPane.OK_OPTION) {
    return;
  }
  Proxy proxy=new Proxy();
  proxy.setEnabled(dialog.enabled.isSelected());
  proxy.setUseSystem(dialog.useSystem.isSelected());
  Integer port=dialog.port.getValue();
  if (port != null) {
    proxy.setPort(port);
  }
  proxy.setHost(dialog.host.getText());
  proxy.setNonProxyHosts(dialog.nonProxyHosts.getText());
  proxy.setType((ProxyType)dialog.type.getSelectedItem());
}

Fixed version (ground truth):
/** 
 * Show a new   {@link ProxyDialog}, and block until the user has completed.
 * @param parent Dialog's parent
 */
public static void show(Frame parent){
  ProxyDialog dialog=new ProxyDialog(parent);
  dialog.setVisible(true);
  if (dialog.response != JOptionPane.OK_OPTION) {
    return;
  }
  Proxy proxy=new Proxy();
  proxy.setEnabled(dialog.enabled.isSelected());
  proxy.setUseSystem(dialog.useSystem.isSelected());
  Integer port=dialog.port.getValue();
  if (port != null) {
    proxy.setPort(port);
  }
  proxy.setHost(dialog.host.getText());
  proxy.setNonProxyHosts(dialog.nonProxyHosts.getText());
  proxy.setType((ProxyType)dialog.type.getSelectedItem());
  Settings.get().setProxy(proxy);
}
Program: 11026
Project: 11026
Buggy source:
/** 
 * Constructs a new <code>WorldWindowGLCanvas</code> on the default graphics device and shares graphics resources with another <code>WorldWindow</code>.
 * @param shareWith a <code>WorldWindow</code> with which to share graphics resources. May be null, in which case resources are not shared.
 * @see GLCanvas#GLCanvas(GLCapabilities,GLCapabilitiesChooser,GLContext,GraphicsDevice)
 */
public WorldWindowNewtCanvas(WorldWindow shareWith){
  super(GLWindow.create(getCaps()));
  this.window=(GLWindow)getNEWTChild();
  if (shareWith != null) {
    this.window.setSharedContext(shareWith.getContext());
  }
  try {
    this.wwd=((WorldWindowNewtDrawable)WorldWind.createConfigurationComponent(AVKey.WORLD_WINDOW_CLASS_NAME));
    this.wwd.initDrawable(window,this);
    if (shareWith != null)     this.wwd.initGpuResourceCache(shareWith.getGpuResourceCache());
 else     this.wwd.initGpuResourceCache(WorldWindowImpl.createGpuResourceCache());
    this.createView();
    this.createDefaultInputHandler();
    WorldWind.addPropertyChangeListener(WorldWind.SHUTDOWN_EVENT,this);
    this.wwd.endInitialization();
  }
 catch (  Exception e) {
    String message=Logging.getMessage("String_Node_Str");
    Logging.logger().severe(message);
    throw new WWRuntimeException(message,e);
  }
}

Fixed version (ground truth):
/** 
 * Constructs a new <code>WorldWindowGLCanvas</code> on the default graphics device and shares graphics resources with another <code>WorldWindow</code>.
 * @param shareWith a <code>WorldWindow</code> with which to share graphics resources. May be null, in which case resources are not shared.
 * @see GLCanvas#GLCanvas(GLCapabilities,GLCapabilitiesChooser,GLContext,GraphicsDevice)
 */
public WorldWindowNewtCanvas(WorldWindow shareWith){
  super(GLWindow.create(getCaps()));
  superContructorComplete=true;
  this.window=(GLWindow)getNEWTChild();
  if (shareWith != null) {
    this.window.setSharedContext(shareWith.getContext());
  }
  try {
    this.wwd=((WorldWindowNewtDrawable)WorldWind.createConfigurationComponent(AVKey.WORLD_WINDOW_CLASS_NAME));
    this.wwd.initDrawable(window,this);
    if (shareWith != null)     this.wwd.initGpuResourceCache(shareWith.getGpuResourceCache());
 else     this.wwd.initGpuResourceCache(WorldWindowImpl.createGpuResourceCache());
    this.createView();
    this.createDefaultInputHandler();
    WorldWind.addPropertyChangeListener(WorldWind.SHUTDOWN_EVENT,this);
    this.wwd.endInitialization();
  }
 catch (  Exception e) {
    String message=Logging.getMessage("String_Node_Str");
    Logging.logger().severe(message);
    throw new WWRuntimeException(message,e);
  }
}
Program: 11027
Project: 11027
Buggy source:
/** 
 * Create an AWT   {@link java.awt.event.KeyEvent} from the given NEWT{@link com.jogamp.newt.event.KeyEvent}. Return value implements  {@link AWTEventFromNewt}.
 * @param event NEWT event to convert
 * @param awtSource Component to set as the AWT event source
 * @return AWT event corresponding to the given NEWT event
 */
public static final java.awt.event.KeyEvent createKeyEvent(com.jogamp.newt.event.KeyEvent event,java.awt.Component awtSource){
  int id=eventTypeAWT2NEWT.get(event.getEventType());
  if (id != KEY_NOT_FOUND_VALUE) {
    int code=id == java.awt.event.KeyEvent.KEY_TYPED ? java.awt.event.KeyEvent.VK_UNDEFINED : event.getKeyCode();
    int location=id == java.awt.event.KeyEvent.KEY_TYPED ? java.awt.event.KeyEvent.KEY_LOCATION_UNKNOWN : java.awt.event.KeyEvent.KEY_LOCATION_STANDARD;
    return new KeyEventFromNewt(event,awtSource,id,event.getWhen(),newtModifiers2Awt(event.getModifiers()),code,event.getKeyChar(),location);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Create an AWT   {@link java.awt.event.KeyEvent} from the given NEWT{@link com.jogamp.newt.event.KeyEvent}. Return value implements  {@link AWTEventFromNewt}.
 * @param event NEWT event to convert
 * @param awtSource Component to set as the AWT event source
 * @return AWT event corresponding to the given NEWT event
 */
public static final java.awt.event.KeyEvent createKeyEvent(com.jogamp.newt.event.KeyEvent event,java.awt.Component awtSource){
  int id=eventTypeAWT2NEWT.get(event.getEventType());
  if (id != KEY_NOT_FOUND_VALUE) {
    int code=id == java.awt.event.KeyEvent.KEY_TYPED ? java.awt.event.KeyEvent.VK_UNDEFINED : event.getKeyCode();
    int location=id == java.awt.event.KeyEvent.KEY_TYPED ? java.awt.event.KeyEvent.KEY_LOCATION_UNKNOWN : java.awt.event.KeyEvent.KEY_LOCATION_STANDARD;
    try {
      return new KeyEventFromNewt(event,awtSource,id,event.getWhen(),newtModifiers2Awt(event.getModifiers()),code,event.getKeyChar(),location);
    }
 catch (    IllegalArgumentException e) {
    }
  }
  return null;
}
Program: 11029
Project: 11029
Buggy source:
protected void delete(GL2 gl){
  if (isCreated()) {
    if (texture) {
      gl.glDeleteRenderbuffers(1,new int[]{id},0);
    }
 else {
      gl.glDeleteTextures(1,new int[]{id},0);
    }
    id=0;
  }
}

Fixed version (ground truth):
protected void delete(GL2 gl){
  if (isCreated()) {
    if (texture) {
      gl.glDeleteTextures(1,new int[]{id},0);
    }
 else {
      gl.glDeleteRenderbuffers(1,new int[]{id},0);
    }
    id=0;
  }
}
Program: 11030
Project: 11030
Buggy source:
@Override protected void applyDrawProjection(DrawContext dc,OGLStackHandler ogsh){
  boolean loaded=false;
  if (dc.getView() instanceof StereoView && ((StereoView)dc.getView()).isStereo()) {
    StereoView stereo=(StereoView)dc.getView();
    double near=stereo.getEyePoint().getLength3();
    double far=this.radius + near;
    Matrix projection=stereo.calculateProjectionMatrix(near,far);
    if (projection != null) {
      double[] matrixArray=new double[16];
      GL2 gl=dc.getGL().getGL2();
      gl.glMatrixMode(GL2.GL_PROJECTION);
      gl.glPushMatrix();
      projection.toArray(matrixArray,0,false);
      gl.glLoadMatrixd(matrixArray,0);
      loaded=true;
    }
  }
  if (!loaded) {
    super.applyDrawProjection(dc,ogsh);
  }
}

Fixed version (ground truth):
@Override protected void applyDrawProjection(DrawContext dc,OGLStackHandler ogsh){
  boolean loaded=false;
  if (dc.getView() instanceof StereoView && ((StereoView)dc.getView()).isStereo()) {
    StereoView stereo=(StereoView)dc.getView();
    double near=stereo.getEyePoint().getLength3();
    double far=this.radius + near;
    Matrix projection=stereo.calculateProjectionMatrix(near,far);
    if (projection != null) {
      double[] matrixArray=new double[16];
      GL2 gl=dc.getGL().getGL2();
      ogsh.pushProjection(gl);
      projection.toArray(matrixArray,0,false);
      gl.glLoadMatrixd(matrixArray,0);
      loaded=true;
    }
  }
  if (!loaded) {
    super.applyDrawProjection(dc,ogsh);
  }
}
Program: 11034
Project: 11034
Buggy source:
@Override public SectorGeometryList tessellate(DrawContext dc){
  double oldExaggeration=dc.getVerticalExaggeration();
  Integer oldMaxLevel=Configuration.getIntegerValue(AVKey.RECTANGULAR_TESSELLATOR_MAX_LEVEL);
  try {
    dc.setVerticalExaggeration(0);
    Configuration.setValue(AVKey.RECTANGULAR_TESSELLATOR_MAX_LEVEL,4);
    return super.tessellate(dc);
  }
  finally {
    dc.setVerticalExaggeration(oldExaggeration);
    Configuration.setValue(AVKey.RECTANGULAR_TESSELLATOR_MAX_LEVEL,oldMaxLevel);
  }
}

Fixed version (ground truth):
@Override public SectorGeometryList tessellate(DrawContext dc){
  Integer oldMaxLevel=Configuration.getIntegerValue(AVKey.RECTANGULAR_TESSELLATOR_MAX_LEVEL);
  try {
    Configuration.setValue(AVKey.RECTANGULAR_TESSELLATOR_MAX_LEVEL,4);
    DrawContextDelegateVerticalExaggerationOverride odc=new DrawContextDelegateVerticalExaggerationOverride(dc);
    odc.overrideVerticalExaggeration(0);
    return super.tessellate(odc);
  }
  finally {
    Configuration.setValue(AVKey.RECTANGULAR_TESSELLATOR_MAX_LEVEL,oldMaxLevel);
  }
}