nus-yam/ex-repair huggingface dataset:
Program: 42926
Project: 42926
Buggy source:
@Test public void function(){
  final String error="String_Node_Str";
  final AlwaysSameResultTheRExecutor executor=new AlwaysSameResultTheRExecutor(TheRDebugConstants.DEBUGGING_IN + "String_Node_Str",DEBUGGING_IN,TextRange.EMPTY_RANGE,error);
  final MockTheRFunctionDebugger debugger=new MockTheRFunctionDebugger("String_Node_Str",2);
  final MockTheRFunctionDebuggerFactory factory=new MockTheRFunctionDebuggerFactory(debugger);
  final MockTheROutputReceiver receiver=new MockTheROutputReceiver();
  final AlwaysSameResponseHandler handler=new AlwaysSameResponseHandler(true);
  final SuccessListener listener=new SuccessListener();
  final TheRValueModifierImpl modifier=new TheRValueModifierImpl(executor,factory,receiver,handler,0);
  modifier.setValue("String_Node_Str","String_Node_Str",listener);
  assertEquals(1,executor.getCounter());
  assertEquals(2,debugger.getCounter());
  assertEquals(1,factory.getCounter());
  assertEquals(Collections.singletonList(error),receiver.getErrors());
  assertEquals(Collections.emptyList(),receiver.getOutputs());
  assertEquals(1,handler.myCounter);
  assertEquals(1,listener.myCounter);
}

Fixed version (ground truth):
@Test public void function(){
  final String error="String_Node_Str";
  final AlwaysSameResultTheRExecutor executor=new AlwaysSameResultTheRExecutor(TheRDebugConstants.DEBUGGING_IN + "String_Node_Str" + DEBUG+ "String_Node_Str"+ "String_Node_Str"+ SERVICE_FUNCTION_PREFIX+ "String_Node_Str"+ SERVICE_ENTER_FUNCTION_SUFFIX+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",DEBUGGING_IN,TextRange.EMPTY_RANGE,error);
  final MockTheRFunctionDebugger debugger=new MockTheRFunctionDebugger("String_Node_Str",2);
  final MockTheRFunctionDebuggerFactory factory=new MockTheRFunctionDebuggerFactory(debugger);
  final MockTheROutputReceiver receiver=new MockTheROutputReceiver();
  final AlwaysSameResponseHandler handler=new AlwaysSameResponseHandler(true);
  final SuccessListener listener=new SuccessListener();
  final TheRValueModifierImpl modifier=new TheRValueModifierImpl(executor,factory,receiver,handler,0);
  modifier.setValue("String_Node_Str","String_Node_Str",listener);
  assertEquals(1,executor.getCounter());
  assertEquals(2,debugger.getCounter());
  assertEquals(1,factory.getCounter());
  assertEquals(Collections.singletonList(error),receiver.getErrors());
  assertEquals(Collections.emptyList(),receiver.getOutputs());
  assertEquals(1,handler.myCounter);
  assertEquals(1,listener.myCounter);
}
Program: 42927
Project: 42927
Buggy source:
private void doSetValue(@NotNull final String name,@NotNull final String value,@NotNull final Listener listener) throws TheRDebuggerException {
  final TheRProcessResponse response=execute(myProcess,name + "String_Node_Str" + value,myReceiver);
switch (response.getType()) {
case EMPTY:
    listener.onSuccess();
  return;
case DEBUGGING_IN:
runFunction();
listener.onSuccess();
return;
case DEBUG_AT:
execute(myProcess,EXECUTE_AND_STEP_COMMAND,RESPONSE,myReceiver);
listener.onSuccess();
return;
default :
throw new TheRUnexpectedResponseException("String_Node_Str" + "String_Node_Str" + "String_Node_Str" + response.getType() + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ DEBUGGING_IN+ "String_Node_Str"+ EMPTY+ "String_Node_Str"+ DEBUG_AT+ "String_Node_Str"+ "String_Node_Str");
}
}

Fixed version (ground truth):
private void doSetValue(@NotNull final String name,@NotNull final String value,@NotNull final Listener listener) throws TheRDebuggerException {
  final TheRProcessResponse response=execute(myProcess,name + "String_Node_Str" + value,myReceiver);
switch (response.getType()) {
case EMPTY:
    if (response.getError().isEmpty()) {
      listener.onSuccess();
    }
 else {
      listener.onError(response.getError());
    }
  return;
case DEBUGGING_IN:
runFunction();
listener.onSuccess();
return;
case DEBUG_AT:
execute(myProcess,EXECUTE_AND_STEP_COMMAND,RESPONSE,myReceiver);
listener.onSuccess();
return;
default :
throw new TheRUnexpectedResponseException("String_Node_Str" + "String_Node_Str" + "String_Node_Str" + response.getType() + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ DEBUGGING_IN+ "String_Node_Str"+ EMPTY+ "String_Node_Str"+ DEBUG_AT+ "String_Node_Str"+ "String_Node_Str");
}
}
Program: 42928
Project: 42928
Buggy source:
private static void addDebuggerTests(@NotNull final TestSuite suite){
  addJUnit4Test(suite,TheRDebuggerEvaluatorImplTest.class);
  addJUnit4Test(suite,TheRExpressionHandlerImplTest.class);
  addJUnit4Test(suite,TheRValueModifierHandlerImplTest.class);
  addJUnit4Test(suite,TheRVarsLoaderImplTest.class);
  addJUnit4Test(suite,TheRFunctionDebuggerFactoryImplTest.class);
  addJUnit4Test(suite,TheRMainFunctionDebuggerTest.class);
  addJUnit4Test(suite,TheRNotMainBraceFunctionDebuggerTest.class);
  addJUnit4Test(suite,TheRNotMainUnbraceFunctionDebuggerTest.class);
  addJUnit4Test(suite,TheRTraceAndDebugUtilsTest.class);
  addJUnit4Test(suite,TheRProcessReceiverTest.class);
  addJUnit4Test(suite,TheRProcessResponseCalculatorTest.class);
  addJUnit4Test(suite,TheRProcessUtilsTest.class);
  addJUnit4Test(suite,TheRDebuggerTest.class);
  addJUnit4Test(suite,TheRDebuggerStringUtilsTest.class);
  addJUnit4Test(suite,TheRScriptReaderImplTest.class);
}

Fixed version (ground truth):
private static void addDebuggerTests(@NotNull final TestSuite suite){
  addJUnit4Test(suite,TheRDebuggerEvaluatorImplTest.class);
  addJUnit4Test(suite,TheRExpressionHandlerImplTest.class);
  addJUnit4Test(suite,TheRValueModifierHandlerImplTest.class);
  addJUnit4Test(suite,TheRValueModifierImplTest.class);
  addJUnit4Test(suite,TheRVarsLoaderImplTest.class);
  addJUnit4Test(suite,TheRFunctionDebuggerFactoryImplTest.class);
  addJUnit4Test(suite,TheRMainFunctionDebuggerTest.class);
  addJUnit4Test(suite,TheRNotMainBraceFunctionDebuggerTest.class);
  addJUnit4Test(suite,TheRNotMainUnbraceFunctionDebuggerTest.class);
  addJUnit4Test(suite,TheRTraceAndDebugUtilsTest.class);
  addJUnit4Test(suite,TheRProcessReceiverTest.class);
  addJUnit4Test(suite,TheRProcessResponseCalculatorTest.class);
  addJUnit4Test(suite,TheRProcessUtilsTest.class);
  addJUnit4Test(suite,TheRDebuggerTest.class);
  addJUnit4Test(suite,TheRDebuggerStringUtilsTest.class);
  addJUnit4Test(suite,TheRScriptReaderImplTest.class);
}
Program: 42929
Project: 42929
Buggy source:
@Override public void run(){
  try {
    do {
      if (!advance())       return;
      myStack.update(myDebugger.getStack());
    }
 while (!isBreakpoint());
    showDebugInformation();
  }
 catch (  final TheRDebuggerException e) {
    LOGGER.error(e);
  }
}

Fixed version (ground truth):
@Override public void run(){
  if (isError) {
    Messages.showErrorDialog(getSession().getProject(),message,title);
  }
 else {
    Messages.showWarningDialog(getSession().getProject(),message,title);
  }
}
Program: 42930
Project: 42930
Buggy source:
private void printInterpreterOutput(){
  final Queue<TheRXOutputBuffer.Entry> messages=myOutputBuffer.getMessages();
  while (!messages.isEmpty()) {
    final TheRXOutputBuffer.Entry message=messages.poll();
    if (message != null) {
      final String text=message.getText();
      final ConsoleViewContentType type=message.getType();
      myConsole.print(text,type);
      if (!StringUtil.endsWithLineBreak(text)) {
        myConsole.print(TheRDebugConstants.LINE_SEPARATOR,type);
      }
    }
  }
}

Fixed version (ground truth):
private void printInterpreterOutput(){
  final Queue<TheRXOutputBuffer.Entry> messages=myOutputBuffer.getMessages();
  while (!messages.isEmpty()) {
    final TheRXOutputBuffer.Entry message=messages.poll();
    if (message != null) {
      final String text=message.getText();
      final ConsoleViewContentType type=message.getType();
      if (type == ConsoleViewContentType.ERROR_OUTPUT) {
        tryFailedImportMessage(text);
      }
      myConsole.print(text,type);
      if (!StringUtil.endsWithLineBreak(text)) {
        myConsole.print(TheRDebugConstants.LINE_SEPARATOR,type);
      }
    }
  }
}
Program: 42931
Project: 42931
Buggy source:
@Override public void setDropFrames(final int number){
  myDropFrames=number;
}

Fixed version (ground truth):
@Override public void setDropFrames(final int number){
  myDropFrames=number;
  if (myDropFrames == myDebuggers.size()) {
    myResult=topDebugger().getResult();
  }
}
Program: 42932
Project: 42932
Buggy source:
@NotNull public String getResult(){
  return topDebugger().getResult();
}

Fixed version (ground truth):
@NotNull public String getResult(){
  if (myResult != null) {
    return myResult;
  }
 else {
    return topDebugger().getResult();
  }
}
Program: 42933
Project: 42933
Buggy source:
public TheREvaluatedFunctionDebuggerHandler(@NotNull final TheRProcess process,@NotNull final TheRFunctionDebuggerFactory debuggerFactory,@NotNull final TheROutputReceiver outputReceiver) throws TheRDebuggerException {
  myDebuggers=new ArrayList<TheRFunctionDebugger>();
  myDropFrames=1;
  appendDebugger(debuggerFactory.getNotMainFunctionDebugger(process,this,outputReceiver));
}

Fixed version (ground truth):
public TheREvaluatedFunctionDebuggerHandler(@NotNull final TheRProcess process,@NotNull final TheRFunctionDebuggerFactory factory,@NotNull final TheROutputReceiver receiver) throws TheRDebuggerException {
  myDebuggers=new ArrayList<TheRFunctionDebugger>();
  myDropFrames=1;
  appendDebugger(factory.getNotMainFunctionDebugger(process,this,receiver));
}
Program: 42934
Project: 42934
Buggy source:
public boolean advance() throws TheRDebuggerException {
  topDebugger().advance();
  while (!topDebugger().hasNext()) {
    if (myDebuggers.size() == 1) {
      return false;
    }
    for (int i=0; i < myDropFrames; i++) {
      popDebugger();
    }
    myDropFrames=1;
  }
  return true;
}

Fixed version (ground truth):
public boolean advance() throws TheRDebuggerException {
  topDebugger().advance();
  while (!myDebuggers.isEmpty() && !topDebugger().hasNext()) {
    if (myDebuggers.size() == 1) {
      return false;
    }
    for (int i=0; i < myDropFrames; i++) {
      popDebugger();
    }
    myDropFrames=1;
  }
  return !myDebuggers.isEmpty();
}
Program: 42935
Project: 42935
Buggy source:
private void goToFlexUnitTestOrCodeAction(AnActionEvent e){
  final Module module=e.getData(DataKeys.MODULE);
  final Project project=e.getData(PlatformDataKeys.PROJECT);
  Editor editor=e.getData(PlatformDataKeys.EDITOR);
  JSClass jsClass=JSPsiImplUtils.findClass((JSFile)psiFile);
  final String packageName=JSResolveUtil.getPackageName(jsClass);
  final VirtualFile testFolder=getTestFolderFromCurrentModule(module);
  Runnable runnable=new Runnable(){
    public void run(){
      if (testFolder != null) {
        try {
          VirtualFile childDirectory=testFolder.findChild(packageName);
          if (childDirectory == null) {
            childDirectory=testFolder.createChildDirectory(project,packageName);
          }
          String testFileName=psiFile.getVirtualFile().getNameWithoutExtension() + "String_Node_Str";
          PsiDirectory psiDirectory=PsiManagerImpl.getInstance(project).findDirectory(childDirectory);
          PsiFile testFile=psiDirectory.findFile(testFileName + "String_Node_Str");
          if (testFile == null) {
            testFile=(PsiFile)CreateClassOrInterfaceAction.createClass(testFileName,packageName,psiDirectory,"String_Node_Str");
          }
          FileEditorManager.getInstance(project).openFile(testFile.getVirtualFile(),true);
        }
 catch (        IOException e1) {
          e1.printStackTrace();
        }
catch (        Exception e1) {
          e1.printStackTrace();
        }
      }
    }
  }
;
  ApplicationManager.getApplication().runWriteAction(runnable);
}

Fixed version (ground truth):
private void goToFlexUnitTestOrCodeAction(AnActionEvent e){
  final Module module=e.getData(DataKeys.MODULE);
  project=e.getData(PlatformDataKeys.PROJECT);
  Editor editor=e.getData(PlatformDataKeys.EDITOR);
  JSClass jsClass=JSPsiImplUtils.findClass((JSFile)psiFile);
  final String packageName=JSResolveUtil.getPackageName(jsClass);
  final VirtualFile testFolder=getTestFolderFromCurrentModule(module);
  Runnable runnable=new Runnable(){
    public void run(){
      if (testFolder != null) {
        try {
          VirtualFile childDirectory=createDirectories(testFolder,packageName);
          String testFileName=psiFile.getVirtualFile().getNameWithoutExtension() + "String_Node_Str";
          PsiDirectory psiDirectory=PsiManagerImpl.getInstance(project).findDirectory(childDirectory);
          PsiFile testFile=psiDirectory.findFile(testFileName + "String_Node_Str");
          if (testFile == null) {
            testFile=(PsiFile)CreateClassOrInterfaceAction.createClass(testFileName,packageName,psiDirectory,"String_Node_Str");
          }
          FileEditorManager.getInstance(project).openFile(testFile.getVirtualFile(),true);
        }
 catch (        IOException e1) {
          e1.printStackTrace();
        }
catch (        Exception e1) {
          e1.printStackTrace();
        }
      }
    }
  }
;
  ApplicationManager.getApplication().runWriteAction(runnable);
}
Program: 42936
Project: 42936
Buggy source:
public void run(){
  if (testFolder != null) {
    try {
      VirtualFile childDirectory=testFolder.findChild(packageName);
      if (childDirectory == null) {
        childDirectory=testFolder.createChildDirectory(project,packageName);
      }
      String testFileName=psiFile.getVirtualFile().getNameWithoutExtension() + "String_Node_Str";
      PsiDirectory psiDirectory=PsiManagerImpl.getInstance(project).findDirectory(childDirectory);
      PsiFile testFile=psiDirectory.findFile(testFileName + "String_Node_Str");
      if (testFile == null) {
        testFile=(PsiFile)CreateClassOrInterfaceAction.createClass(testFileName,packageName,psiDirectory,"String_Node_Str");
      }
      FileEditorManager.getInstance(project).openFile(testFile.getVirtualFile(),true);
    }
 catch (    IOException e1) {
      e1.printStackTrace();
    }
catch (    Exception e1) {
      e1.printStackTrace();
    }
  }
}

Fixed version (ground truth):
public void run(){
  if (testFolder != null) {
    try {
      VirtualFile childDirectory=createDirectories(testFolder,packageName);
      String testFileName=psiFile.getVirtualFile().getNameWithoutExtension() + "String_Node_Str";
      PsiDirectory psiDirectory=PsiManagerImpl.getInstance(project).findDirectory(childDirectory);
      PsiFile testFile=psiDirectory.findFile(testFileName + "String_Node_Str");
      if (testFile == null) {
        testFile=(PsiFile)CreateClassOrInterfaceAction.createClass(testFileName,packageName,psiDirectory,"String_Node_Str");
      }
      FileEditorManager.getInstance(project).openFile(testFile.getVirtualFile(),true);
    }
 catch (    IOException e1) {
      e1.printStackTrace();
    }
catch (    Exception e1) {
      e1.printStackTrace();
    }
  }
}
Program: 42940
Project: 42940
Buggy source:
/** 
 * Ends the current array or object.
 */
public SELF end(){
  if (states.size() == 0)   throw new JsonWriterException("String_Node_Str");
  if (inObject) {
    raw('}');
  }
 else {
    raw(']');
  }
  inObject=states.pop();
  return castThis();
}

Fixed version (ground truth):
/** 
 * Ends the current array or object.
 */
public SELF end(){
  if (states.size() == 0)   throw new JsonWriterException("String_Node_Str");
  if (inObject) {
    raw('}');
  }
 else {
    raw(']');
  }
  first=false;
  inObject=states.pop();
  return castThis();
}
Program: 42941
Project: 42941
Buggy source:
@Test public void testFailBadKeywords4(){
  try {
    JsonParser.parse("String_Node_Str");
    fail();
  }
 catch (  JsonParserException e) {
    testException(e,1,2);
  }
}

Fixed version (ground truth):
@Test public void testFailBadKeywords4(){
  try {
    JsonParser.parse("String_Node_Str");
    fail();
  }
 catch (  JsonParserException e) {
  }
}
Program: 42942
Project: 42942
Buggy source:
@Test public void testFailBadKeywords4(){
  try {
    JsonParser.parse("String_Node_Str");
    fail();
  }
 catch (  JsonParserException e) {
  }
}

Fixed version (ground truth):
@Test public void testFailBadKeywords4(){
  try {
    JsonParser.parse("String_Node_Str");
    fail();
  }
 catch (  JsonParserException e) {
    testException(e,1,2);
  }
}
Program: 42943
Project: 42943
Buggy source:
/** 
 * Creates an area from the supplied shape.
 */
public Area(IShape s){
  double[] segmentCoords=new double[6];
  double lastMoveX=0f;
  double lastMoveY=0f;
  int rulesIndex=0;
  int coordsIndex=0;
  for (PathIterator pi=s.pathIterator(null); !pi.isDone(); pi.next()) {
    _coords=adjustSize(_coords,coordsIndex + 6);
    _rules=adjustSize(_rules,rulesIndex + 1);
    _offsets=adjustSize(_offsets,rulesIndex + 1);
    _rules[rulesIndex]=pi.currentSegment(segmentCoords);
    _offsets[rulesIndex]=coordsIndex;
switch (_rules[rulesIndex]) {
case PathIterator.SEG_MOVETO:
      _coords[coordsIndex++]=segmentCoords[0];
    _coords[coordsIndex++]=segmentCoords[1];
  lastMoveX=segmentCoords[0];
lastMoveY=segmentCoords[1];
++_moveToCount;
break;
case PathIterator.SEG_LINETO:
if ((segmentCoords[0] != lastMoveX) || (segmentCoords[1] != lastMoveY)) {
_coords[coordsIndex++]=segmentCoords[0];
_coords[coordsIndex++]=segmentCoords[1];
}
 else {
--rulesIndex;
}
break;
case PathIterator.SEG_QUADTO:
System.arraycopy(segmentCoords,0,_coords,coordsIndex,4);
coordsIndex+=4;
_isPolygonal=false;
break;
case PathIterator.SEG_CUBICTO:
System.arraycopy(segmentCoords,0,_coords,coordsIndex,6);
coordsIndex+=6;
_isPolygonal=false;
break;
case PathIterator.SEG_CLOSE:
break;
}
++rulesIndex;
}
if ((rulesIndex != 0) && (_rules[rulesIndex - 1] != PathIterator.SEG_CLOSE)) {
_rules[rulesIndex]=PathIterator.SEG_CLOSE;
_offsets[rulesIndex]=_coordsSize;
}
_rulesSize=rulesIndex;
_coordsSize=coordsIndex;
}

Fixed version (ground truth):
/** 
 * Creates an area from the supplied shape.
 */
public Area(IShape s){
  double[] segmentCoords=new double[6];
  double lastMoveX=0f;
  double lastMoveY=0f;
  int rulesIndex=0;
  int coordsIndex=0;
  for (PathIterator pi=s.pathIterator(null); !pi.isDone(); pi.next()) {
    _coords=adjustSize(_coords,coordsIndex + 6);
    _rules=adjustSize(_rules,rulesIndex + 1);
    _offsets=adjustSize(_offsets,rulesIndex + 1);
    _rules[rulesIndex]=pi.currentSegment(segmentCoords);
    _offsets[rulesIndex]=coordsIndex;
switch (_rules[rulesIndex]) {
case PathIterator.SEG_MOVETO:
      _coords[coordsIndex++]=segmentCoords[0];
    _coords[coordsIndex++]=segmentCoords[1];
  lastMoveX=segmentCoords[0];
lastMoveY=segmentCoords[1];
++_moveToCount;
break;
case PathIterator.SEG_LINETO:
if ((segmentCoords[0] != lastMoveX) || (segmentCoords[1] != lastMoveY)) {
_coords[coordsIndex++]=segmentCoords[0];
_coords[coordsIndex++]=segmentCoords[1];
}
 else {
--rulesIndex;
}
break;
case PathIterator.SEG_QUADTO:
System.arraycopy(segmentCoords,0,_coords,coordsIndex,4);
coordsIndex+=4;
_isPolygonal=false;
break;
case PathIterator.SEG_CUBICTO:
System.arraycopy(segmentCoords,0,_coords,coordsIndex,6);
coordsIndex+=6;
_isPolygonal=false;
break;
case PathIterator.SEG_CLOSE:
break;
}
++rulesIndex;
}
if ((rulesIndex != 0) && (_rules[rulesIndex - 1] != PathIterator.SEG_CLOSE)) {
_rules=adjustSize(_rules,rulesIndex + 1);
_rules[rulesIndex]=PathIterator.SEG_CLOSE;
_offsets=adjustSize(_offsets,rulesIndex + 1);
_offsets[rulesIndex]=coordsIndex;
++rulesIndex;
}
_rulesSize=rulesIndex;
_coordsSize=coordsIndex;
}
Program: 42944
Project: 42944
Buggy source:
/** 
 * Creates an area from the supplied shape.
 */
public Area(IShape s){
  float[] segmentCoords=new float[6];
  float lastMoveX=0f;
  float lastMoveY=0f;
  int rulesIndex=0;
  int coordsIndex=0;
  for (PathIterator pi=s.pathIterator(null); !pi.isDone(); pi.next()) {
    _coords=adjustSize(_coords,coordsIndex + 6);
    _rules=adjustSize(_rules,rulesIndex + 1);
    _offsets=adjustSize(_offsets,rulesIndex + 1);
    _rules[rulesIndex]=pi.currentSegment(segmentCoords);
    _offsets[rulesIndex]=coordsIndex;
switch (_rules[rulesIndex]) {
case PathIterator.SEG_MOVETO:
      _coords[coordsIndex++]=segmentCoords[0];
    _coords[coordsIndex++]=segmentCoords[1];
  lastMoveX=segmentCoords[0];
lastMoveY=segmentCoords[1];
++_moveToCount;
break;
case PathIterator.SEG_LINETO:
if ((segmentCoords[0] != lastMoveX) || (segmentCoords[1] != lastMoveY)) {
_coords[coordsIndex++]=segmentCoords[0];
_coords[coordsIndex++]=segmentCoords[1];
}
 else {
--rulesIndex;
}
break;
case PathIterator.SEG_QUADTO:
System.arraycopy(segmentCoords,0,_coords,coordsIndex,4);
coordsIndex+=4;
_isPolygonal=false;
break;
case PathIterator.SEG_CUBICTO:
System.arraycopy(segmentCoords,0,_coords,coordsIndex,6);
coordsIndex+=6;
_isPolygonal=false;
break;
case PathIterator.SEG_CLOSE:
break;
}
++rulesIndex;
}
if ((rulesIndex != 0) && (_rules[rulesIndex - 1] != PathIterator.SEG_CLOSE)) {
_rules[rulesIndex]=PathIterator.SEG_CLOSE;
_offsets[rulesIndex]=_coordsSize;
}
_rulesSize=rulesIndex;
_coordsSize=coordsIndex;
}

Fixed version (ground truth):
/** 
 * Creates an area from the supplied shape.
 */
public Area(IShape s){
  float[] segmentCoords=new float[6];
  float lastMoveX=0f;
  float lastMoveY=0f;
  int rulesIndex=0;
  int coordsIndex=0;
  for (PathIterator pi=s.pathIterator(null); !pi.isDone(); pi.next()) {
    _coords=adjustSize(_coords,coordsIndex + 6);
    _rules=adjustSize(_rules,rulesIndex + 1);
    _offsets=adjustSize(_offsets,rulesIndex + 1);
    _rules[rulesIndex]=pi.currentSegment(segmentCoords);
    _offsets[rulesIndex]=coordsIndex;
switch (_rules[rulesIndex]) {
case PathIterator.SEG_MOVETO:
      _coords[coordsIndex++]=segmentCoords[0];
    _coords[coordsIndex++]=segmentCoords[1];
  lastMoveX=segmentCoords[0];
lastMoveY=segmentCoords[1];
++_moveToCount;
break;
case PathIterator.SEG_LINETO:
if ((segmentCoords[0] != lastMoveX) || (segmentCoords[1] != lastMoveY)) {
_coords[coordsIndex++]=segmentCoords[0];
_coords[coordsIndex++]=segmentCoords[1];
}
 else {
--rulesIndex;
}
break;
case PathIterator.SEG_QUADTO:
System.arraycopy(segmentCoords,0,_coords,coordsIndex,4);
coordsIndex+=4;
_isPolygonal=false;
break;
case PathIterator.SEG_CUBICTO:
System.arraycopy(segmentCoords,0,_coords,coordsIndex,6);
coordsIndex+=6;
_isPolygonal=false;
break;
case PathIterator.SEG_CLOSE:
break;
}
++rulesIndex;
}
if ((rulesIndex != 0) && (_rules[rulesIndex - 1] != PathIterator.SEG_CLOSE)) {
_rules=adjustSize(_rules,rulesIndex + 1);
_rules[rulesIndex]=PathIterator.SEG_CLOSE;
_offsets=adjustSize(_offsets,rulesIndex + 1);
_offsets[rulesIndex]=coordsIndex;
++rulesIndex;
}
_rulesSize=rulesIndex;
_coordsSize=coordsIndex;
}
Program: 42945
Project: 42945
Buggy source:
public void setTransform(AffineTransform t){
  type=t.type;
  setTransform(t.m00,t.m10,t.m01,t.m11,t.m02,t.m12);
}

Fixed version (ground truth):
public void setTransform(AffineTransform t){
  setTransform(t.m00,t.m10,t.m01,t.m11,t.m02,t.m12);
  type=t.type;
}
Program: 42946
Project: 42946
Buggy source:
public void setTransform(AffineTransform t){
  type=t.type;
  setTransform(t.m00,t.m10,t.m01,t.m11,t.m02,t.m12);
}

Fixed version (ground truth):
public void setTransform(AffineTransform t){
  setTransform(t.m00,t.m10,t.m01,t.m11,t.m02,t.m12);
  type=t.type;
}
Program: 42947
Project: 42947
Buggy source:
@Override public float getTy(){
  return this.tx;
}

Fixed version (ground truth):
@Override public float getTy(){
  return this.ty;
}
Program: 42948
Project: 42948
Buggy source:
@Override public void setFrame(float x,float y,float w,float h){
  this.x=x;
  this.y=y;
  this.width=width;
  this.height=height;
}

Fixed version (ground truth):
@Override public void setFrame(float x,float y,float width,float height){
  this.x=x;
  this.y=y;
  this.width=width;
  this.height=height;
}
Program: 42949
Project: 42949
Buggy source:
/** 
 * {@inheritDoc} 
 */
public Class<?> resolveClass(final Unmarshaller unmarshaller,final String className,final long serialVersionUID) throws IOException, ClassNotFoundException {
  final String name=(String)unmarshaller.readObject();
  if (name == null) {
    return Class.forName(className,false,Module.class.getClassLoader());
  }
  final String slot=(String)unmarshaller.readObject();
  final ModuleIdentifier identifier=ModuleIdentifier.create(name,slot);
  try {
    return Class.forName(className,false,moduleLoader.loadModule(identifier).getClassLoader());
  }
 catch (  ModuleLoadException e) {
    final InvalidClassException ce=new InvalidClassException(className,"String_Node_Str");
    ce.initCause(e);
    throw ce;
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public Class<?> resolveClass(final Unmarshaller unmarshaller,final String className,final long serialVersionUID) throws IOException, ClassNotFoundException {
  final String name=(String)unmarshaller.readObject();
  if (name == null) {
    final ClassLoader classLoader;
    if (System.getSecurityManager() == null) {
      classLoader=Module.class.getClassLoader();
    }
 else {
      classLoader=AccessController.doPrivileged(new PrivilegedAction<ClassLoader>(){
        @Override public ClassLoader run(){
          return Module.class.getClassLoader();
        }
      }
);
    }
    return Class.forName(className,false,classLoader);
  }
  final String slot=(String)unmarshaller.readObject();
  final ModuleIdentifier identifier=ModuleIdentifier.create(name,slot);
  try {
    final ClassLoader classLoader;
    final Module module=moduleLoader.loadModule(identifier);
    if (System.getSecurityManager() == null) {
      classLoader=module.getClassLoader();
    }
 else {
      classLoader=AccessController.doPrivileged(new PrivilegedAction<ClassLoader>(){
        @Override public ClassLoader run(){
          return module.getClassLoader();
        }
      }
);
    }
    return Class.forName(className,false,classLoader);
  }
 catch (  ModuleLoadException e) {
    final InvalidClassException ce=new InvalidClassException(className,"String_Node_Str");
    ce.initCause(e);
    throw ce;
  }
}
Program: 42950
Project: 42950
Buggy source:
/** 
 * {@inheritDoc} 
 */
public Class<?> resolveProxyClass(final Unmarshaller unmarshaller,final String[] names) throws IOException, ClassNotFoundException {
  final String name=(String)unmarshaller.readObject();
  final ClassLoader classLoader;
  if (name == null) {
    classLoader=Module.class.getClassLoader();
  }
 else {
    final String slot=(String)unmarshaller.readObject();
    final ModuleIdentifier identifier=ModuleIdentifier.create(name,slot);
    final Module module;
    try {
      module=moduleLoader.loadModule(identifier);
    }
 catch (    ModuleLoadException e) {
      final InvalidClassException ce=new InvalidClassException("String_Node_Str");
      ce.initCause(e);
      throw ce;
    }
    classLoader=module.getClassLoader();
  }
  final int len=names.length;
  final Class<?>[] interfaces=new Class<?>[len];
  for (int i=0; i < len; i++) {
    interfaces[i]=Class.forName(names[i],false,classLoader);
  }
  return Proxy.getProxyClass(classLoader,interfaces);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public Class<?> resolveProxyClass(final Unmarshaller unmarshaller,final String[] names) throws IOException, ClassNotFoundException {
  final String name=(String)unmarshaller.readObject();
  final ClassLoader classLoader;
  if (name == null) {
    if (System.getSecurityManager() == null) {
      classLoader=Module.class.getClassLoader();
    }
 else {
      classLoader=AccessController.doPrivileged(new PrivilegedAction<ClassLoader>(){
        @Override public ClassLoader run(){
          return Module.class.getClassLoader();
        }
      }
);
    }
  }
 else {
    final String slot=(String)unmarshaller.readObject();
    final ModuleIdentifier identifier=ModuleIdentifier.create(name,slot);
    final Module module;
    try {
      module=moduleLoader.loadModule(identifier);
    }
 catch (    ModuleLoadException e) {
      final InvalidClassException ce=new InvalidClassException("String_Node_Str");
      ce.initCause(e);
      throw ce;
    }
    classLoader=module.getClassLoader();
  }
  final int len=names.length;
  final Class<?>[] interfaces=new Class<?>[len];
  for (int i=0; i < len; i++) {
    interfaces[i]=Class.forName(names[i],false,classLoader);
  }
  return Proxy.getProxyClass(classLoader,interfaces);
}
Program: 42951
Project: 42951
Buggy source:
public <T>T[] toArray(final T[] a){
  ArrayList<T> list=new ArrayList<T>();
  list.addAll((Set<T>)this);
  return list.toArray(a);
}

Fixed version (ground truth):
public Object[] toArray(){
  ArrayList<Object> list=new ArrayList<Object>(size());
  list.addAll(this);
  return list.toArray();
}
Program: 42957
Project: 42957
Buggy source:
StepObjectOutput(final Queue<Step> steps) throws IOException {
  super(SerializingCloner.this.bufferSize);
  this.steps=steps;
  start(byteOutput);
}

Fixed version (ground truth):
StepObjectOutput(final Queue<Step> steps) throws IOException {
  super(SerializingCloner.this.bufferSize);
  this.steps=steps;
  super.start(byteOutput);
}
Program: 42958
Project: 42958
Buggy source:
public void clearInstanceCache() throws IOException {
}

Fixed version (ground truth):
public void clearInstanceCache() throws IOException {
  throw new UnsupportedOperationException();
}
Program: 42959
Project: 42959
Buggy source:
public void finish() throws IOException {
  super.finish();
}

Fixed version (ground truth):
public void finish() throws IOException {
  throw new UnsupportedOperationException();
}
Program: 42960
Project: 42960
Buggy source:
protected Object doReadObject(final boolean unshared) throws ClassNotFoundException, IOException {
  finish();
  Step step;
  do {
    step=steps.poll();
  }
 while (step instanceof ByteDataStep);
  if (step == null) {
    throw new EOFException();
  }
  @SuppressWarnings("String_Node_Str") final Object clone=SerializingCloner.this.clone(((CloneStep)step).getOrig());
  step=steps.peek();
  if (step instanceof ByteDataStep) {
    start(Marshalling.createByteInput(new ByteArrayInputStream(((ByteDataStep)steps.poll()).getBytes())));
  }
  return clone;
}

Fixed version (ground truth):
protected Object doReadObject(final boolean unshared) throws ClassNotFoundException, IOException {
  finish();
  Step step;
  do {
    step=steps.poll();
  }
 while (step instanceof ByteDataStep);
  if (step == null) {
    throw new EOFException();
  }
  @SuppressWarnings("String_Node_Str") final Object clone=SerializingCloner.this.clone(((CloneStep)step).getOrig());
  step=steps.peek();
  if (step instanceof ByteDataStep) {
    super.start(Marshalling.createByteInput(new ByteArrayInputStream(((ByteDataStep)steps.poll()).getBytes())));
  }
  return clone;
}
Program: 42961
Project: 42961
Buggy source:
public void clearClassCache() throws IOException {
}

Fixed version (ground truth):
public void clearClassCache() throws IOException {
  throw new UnsupportedOperationException();
}
Program: 42962
Project: 42962
Buggy source:
StepObjectInput(final Queue<Step> steps) throws IOException {
  super(bufferSize);
  this.steps=steps;
  if (steps.peek() instanceof ByteDataStep) {
    final ByteDataStep step=(ByteDataStep)steps.poll();
    start(Marshalling.createByteInput(new ByteArrayInputStream(step.getBytes())));
  }
}

Fixed version (ground truth):
StepObjectInput(final Queue<Step> steps) throws IOException {
  super(bufferSize);
  this.steps=steps;
  if (steps.peek() instanceof ByteDataStep) {
    final ByteDataStep step=(ByteDataStep)steps.poll();
    super.start(Marshalling.createByteInput(new ByteArrayInputStream(step.getBytes())));
  }
}
Program: 42963
Project: 42963
Buggy source:
public void start(final ByteInput byteInput) throws IOException {
  super.start(byteInput);
}

Fixed version (ground truth):
public void start(final ByteInput byteInput) throws IOException {
  throw new UnsupportedOperationException();
}
Program: 42965
Project: 42965
Buggy source:
public void testEquals() throws Throwable {
  final ObjectCloner objectCloner=ObjectCloners.getSerializingObjectClonerFactory().createCloner(new ClonerConfiguration());
  final Object[] objects={Pair.create("String_Node_Str","String_Node_Str"),Arrays.asList("String_Node_Str",Integer.valueOf(2),Boolean.TRUE,"String_Node_Str"),new DateFieldType(new Date(),true)};
  for (  Object orig : objects) {
    final Object clone=objectCloner.clone(orig);
    assertEquals(clone,orig);
  }
}

Fixed version (ground truth):
public void testEquals() throws Throwable {
  final ObjectCloner objectCloner=ObjectCloners.getSerializingObjectClonerFactory().createCloner(new ClonerConfiguration());
  final Object[] objects={Pair.create("String_Node_Str","String_Node_Str"),Arrays.asList("String_Node_Str",Integer.valueOf(2),Boolean.TRUE,"String_Node_Str"),new DateFieldType(new Date(),true),new ExtTest(12345)};
  for (  Object orig : objects) {
    final Object clone=objectCloner.clone(orig);
    assertEquals(clone,orig);
  }
}
Program: 42966
Project: 42966
Buggy source:
/** 
 * {@inheritDoc} 
 */
public void annotateClass(final Marshaller marshaller,final Class<?> clazz) throws IOException {
  final Module module=Module.forClass(clazz);
  if (module == null) {
    throw new InvalidClassException(clazz.getName(),"String_Node_Str");
  }
  final ModuleIdentifier identifier=module.getIdentifier();
  marshaller.writeObject(identifier.getName());
  marshaller.writeObject(identifier.getSlot());
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public void annotateClass(final Marshaller marshaller,final Class<?> clazz) throws IOException {
  final Module module=Module.forClass(clazz);
  if (module == null) {
    marshaller.writeObject(null);
  }
 else {
    final ModuleIdentifier identifier=module.getIdentifier();
    marshaller.writeObject(identifier.getName());
    marshaller.writeObject(identifier.getSlot());
  }
}
Program: 42967
Project: 42967
Buggy source:
private static SerializableClassDescriptor getSerializableClassDescriptor(final Class<?> subject){
  return AccessController.doPrivileged(new PrivilegedAction<SerializableClassDescriptor>(){
    public SerializableClassDescriptor run(){
      final SerializableClassRegistry reg=SerializableClassRegistry.getInstance();
      final SerializableClass serializableClass=reg.lookup(subject);
      final SerializableField[] fields=serializableClass.getFields();
      final boolean hasWriteObject=serializableClass.hasWriteObject();
      try {
        return new BasicSerializableClassDescriptor(serializableClass,null,fields,Externalizable.class.isAssignableFrom(subject) ? Protocol.ID_EXTERNALIZABLE_CLASS : hasWriteObject ? Protocol.ID_WRITE_OBJECT_CLASS : Protocol.ID_SERIALIZABLE_CLASS);
      }
 catch (      ClassNotFoundException e) {
        throw new NoClassDefFoundError(e.getMessage());
      }
    }
  }
);
}

Fixed version (ground truth):
private static SerializableClassDescriptor getSerializableClassDescriptor(final Class<?> subject,final ClassDescriptor superDescriptor){
  return AccessController.doPrivileged(new PrivilegedAction<SerializableClassDescriptor>(){
    public SerializableClassDescriptor run(){
      final SerializableClassRegistry reg=SerializableClassRegistry.getInstance();
      final SerializableClass serializableClass=reg.lookup(subject);
      final SerializableField[] fields=serializableClass.getFields();
      final boolean hasWriteObject=serializableClass.hasWriteObject();
      try {
        return new BasicSerializableClassDescriptor(serializableClass,superDescriptor,fields,Externalizable.class.isAssignableFrom(subject) ? Protocol.ID_EXTERNALIZABLE_CLASS : hasWriteObject ? Protocol.ID_WRITE_OBJECT_CLASS : Protocol.ID_SERIALIZABLE_CLASS);
      }
 catch (      ClassNotFoundException e) {
        throw new NoClassDefFoundError(e.getMessage());
      }
    }
  }
);
}
Program: 42968
Project: 42968
Buggy source:
public SerializableClassDescriptor run(){
  final SerializableClassRegistry reg=SerializableClassRegistry.getInstance();
  final SerializableClass serializableClass=reg.lookup(subject);
  final SerializableField[] fields=serializableClass.getFields();
  final boolean hasWriteObject=serializableClass.hasWriteObject();
  try {
    return new BasicSerializableClassDescriptor(serializableClass,null,fields,Externalizable.class.isAssignableFrom(subject) ? Protocol.ID_EXTERNALIZABLE_CLASS : hasWriteObject ? Protocol.ID_WRITE_OBJECT_CLASS : Protocol.ID_SERIALIZABLE_CLASS);
  }
 catch (  ClassNotFoundException e) {
    throw new NoClassDefFoundError(e.getMessage());
  }
}

Fixed version (ground truth):
public SerializableClassDescriptor run(){
  final SerializableClassRegistry reg=SerializableClassRegistry.getInstance();
  final SerializableClass serializableClass=reg.lookup(subject);
  final SerializableField[] fields=serializableClass.getFields();
  final boolean hasWriteObject=serializableClass.hasWriteObject();
  try {
    return new BasicSerializableClassDescriptor(serializableClass,superDescriptor,fields,Externalizable.class.isAssignableFrom(subject) ? Protocol.ID_EXTERNALIZABLE_CLASS : hasWriteObject ? Protocol.ID_WRITE_OBJECT_CLASS : Protocol.ID_SERIALIZABLE_CLASS);
  }
 catch (  ClassNotFoundException e) {
    throw new NoClassDefFoundError(e.getMessage());
  }
}
Program: 42969
Project: 42969
Buggy source:
public void run() throws Throwable {
  final MarshallerFactory factory=new RiverMarshallerFactory();
  final MarshallingConfiguration configuration=new MarshallingConfiguration();
  configuration.setCreator(new SunReflectiveCreator());
  configure(configuration);
  final Marshaller marshaller=factory.createMarshaller(configuration);
  final ByteArrayOutputStream baos=new ByteArrayOutputStream(10240);
  marshaller.start(Marshalling.createByteOutput(baos));
  runWrite(marshaller);
  marshaller.finish();
  final byte[] bytes=baos.toByteArray();
  final Unmarshaller unmarshaller=factory.createUnmarshaller(configuration);
  unmarshaller.start(Marshalling.createByteInput(new ByteArrayInputStream(bytes)));
  runRead(unmarshaller);
  unmarshaller.finish();
}

Fixed version (ground truth):
public void run() throws Throwable {
  final MarshallerFactory factory=new RiverMarshallerFactory();
  final MarshallingConfiguration configuration=new MarshallingConfiguration();
  configuration.setSerializedCreator(new SunReflectiveCreator());
  configuration.setExternalizerCreator(new ReflectiveCreator());
  configure(configuration);
  final Marshaller marshaller=factory.createMarshaller(configuration);
  final ByteArrayOutputStream baos=new ByteArrayOutputStream(10240);
  marshaller.start(Marshalling.createByteOutput(baos));
  runWrite(marshaller);
  marshaller.finish();
  final byte[] bytes=baos.toByteArray();
  final Unmarshaller unmarshaller=factory.createUnmarshaller(configuration);
  unmarshaller.start(Marshalling.createByteInput(new ByteArrayInputStream(bytes)));
  runRead(unmarshaller);
  unmarshaller.finish();
}
Program: 42970
Project: 42970
Buggy source:
public void runWrite(final Marshaller marshaller) throws Throwable {
  marshaller.writeObject(test);
}

Fixed version (ground truth):
public void runWrite(final Marshaller marshaller) throws Throwable {
  marshaller.writeObject(test);
  marshaller.writeObject(test);
}
Program: 42971
Project: 42971
Buggy source:
public SimpleMarshallerTests(TestMarshallerProvider testMarshallerProvider,TestUnmarshallerProvider testUnmarshallerProvider,MarshallingConfiguration configuration){
  super(testMarshallerProvider,testUnmarshallerProvider,configuration);
}

Fixed version (ground truth):
/** 
 * Simple constructor for running one test at a time from an IDE.
 */
public SimpleMarshallerTests(){
  super(new MarshallerFactoryTestMarshallerProvider(new RiverMarshallerFactory(),3),new MarshallerFactoryTestUnmarshallerProvider(new RiverMarshallerFactory(),3),getOneTestMarshallingConfiguration());
}
Program: 42972
Project: 42972
Buggy source:
public void runRead(final Unmarshaller unmarshaller) throws Throwable {
  unmarshaller.readObject();
}

Fixed version (ground truth):
public void runRead(final Unmarshaller unmarshaller) throws Throwable {
  final LRUMap map=unmarshaller.readObject(LRUMap.class);
  assertSame(map,unmarshaller.readObject());
}
Program: 42973
Project: 42973
Buggy source:
private static void populateAllMaps(List<Object> list){
  populateAllMapSizes(list,hashMapMaker);
  populateAllMapSizes(list,concurrentHashMapMaker);
  populateAllMapSizes(list,linkedHashMapMaker);
  populateAllMapSizes(list,identityHashMapMaker);
  populateAllMapSizes(list,treeMapMaker);
  populateAllMapSizes(list,treeMapCompMaker);
}

Fixed version (ground truth):
private static void populateAllMaps(List<Object> list){
  populateAllMapSizes(list,hashMapMaker);
  populateAllMapSizes(list,concurrentHashMapMaker);
  populateAllMapSizes(list,linkedHashMapMaker);
  populateAllMapSizes(list,identityHashMapMaker);
  populateAllMapSizes(list,treeMapMaker);
  populateAllMapSizes(list,treeMapCompMaker);
  populateAllMapSizes(list,lruMapMaker);
}
Program: 42975
Project: 42975
Buggy source:
public StepObjectOutput(final Queue<Step> steps) throws IOException {
  super(SerializingCloner.this.bufferSize);
  this.steps=steps;
  start(byteOutput);
}

Fixed version (ground truth):
StepObjectOutput(final Queue<Step> steps) throws IOException {
  super(SerializingCloner.this.bufferSize);
  this.steps=steps;
  start(byteOutput);
}
Program: 42976
Project: 42976
Buggy source:
protected void doWriteObject(final Object obj,final boolean unshared) throws IOException {
  final ByteArrayOutputStream baos=byteArrayOutputStream;
  if (baos.size() > 0) {
    steps.add(new ByteDataStep(baos.toByteArray()));
    baos.reset();
  }
  steps.add(new CloneStep(obj));
}

Fixed version (ground truth):
protected void doWriteObject(final Object obj,final boolean unshared) throws IOException {
  super.flush();
  final ByteArrayOutputStream baos=byteArrayOutputStream;
  if (baos.size() > 0) {
    steps.add(new ByteDataStep(baos.toByteArray()));
    baos.reset();
  }
  steps.add(new CloneStep(obj));
}
Program: 42977
Project: 42977
Buggy source:
public void flush() throws IOException {
  final ByteArrayOutputStream baos=byteArrayOutputStream;
  steps.add(new ByteDataStep(baos.toByteArray()));
  baos.reset();
}

Fixed version (ground truth):
public void flush() throws IOException {
  super.flush();
  final ByteArrayOutputStream baos=byteArrayOutputStream;
  steps.add(new ByteDataStep(baos.toByteArray()));
  baos.reset();
}
Program: 42978
Project: 42978
Buggy source:
protected Object doReadObject(final boolean unshared) throws ClassNotFoundException, IOException {
  finish();
  Step step;
  do {
    step=steps.poll();
  }
 while (step instanceof ByteDataStep);
  if (step == null) {
    throw new EOFException();
  }
  final Object clone=SerializingCloner.this.clone(((CloneStep)step).getOrig());
  step=steps.peek();
  if (step instanceof ByteDataStep) {
    start(Marshalling.createByteInput(new ByteArrayInputStream(((ByteDataStep)steps.poll()).getBytes())));
  }
  return clone;
}

Fixed version (ground truth):
protected Object doReadObject(final boolean unshared) throws ClassNotFoundException, IOException {
  finish();
  Step step;
  do {
    step=steps.poll();
  }
 while (step instanceof ByteDataStep);
  if (step == null) {
    throw new EOFException();
  }
  @SuppressWarnings("String_Node_Str") final Object clone=SerializingCloner.this.clone(((CloneStep)step).getOrig());
  step=steps.peek();
  if (step instanceof ByteDataStep) {
    start(Marshalling.createByteInput(new ByteArrayInputStream(((ByteDataStep)steps.poll()).getBytes())));
  }
  return clone;
}
Program: 42980
Project: 42980
Buggy source:
public StepObjectInput(final Queue<Step> steps) throws IOException {
  super(bufferSize);
  this.steps=steps;
  if (steps.peek() instanceof ByteDataStep) {
    final ByteDataStep step=(ByteDataStep)steps.poll();
    start(Marshalling.createByteInput(new ByteArrayInputStream(step.getBytes())));
  }
}

Fixed version (ground truth):
StepObjectInput(final Queue<Step> steps) throws IOException {
  super(bufferSize);
  this.steps=steps;
  if (steps.peek() instanceof ByteDataStep) {
    final ByteDataStep step=(ByteDataStep)steps.poll();
    start(Marshalling.createByteInput(new ByteArrayInputStream(step.getBytes())));
  }
}
Program: 42981
Project: 42981
Buggy source:
public void registerValidation(final ObjectInputValidation obj,final int prio) throws NotActiveException, InvalidObjectException {
}

Fixed version (ground truth):
public void registerValidation(final ObjectInputValidation obj,final int priority) throws NotActiveException, InvalidObjectException {
}
Program: 42982
Project: 42982
Buggy source:
public StepObjectInputStream(final Queue<Step> steps,final ClonerPutField clonerPutField,final Object clone,final SerializableClass cloneInfo) throws IOException {
  super(new StepObjectInput(steps));
  this.clonerPutField=clonerPutField;
  this.clone=clone;
  this.cloneInfo=cloneInfo;
}

Fixed version (ground truth):
StepObjectInputStream(final Queue<Step> steps,final ClonerPutField clonerPutField,final Object clone,final SerializableClass cloneInfo) throws IOException {
  super(new StepObjectInput(steps));
  this.clonerPutField=clonerPutField;
  this.clone=clone;
  this.cloneInfo=cloneInfo;
}
Program: 42983
Project: 42983
Buggy source:
protected StepObjectOutputStream(final Queue<Step> steps,final ClonerPutField clonerPutField,final Object subject) throws IOException {
  super(new StepObjectOutput(steps));
  this.steps=steps;
  this.clonerPutField=clonerPutField;
  this.subject=subject;
}

Fixed version (ground truth):
StepObjectOutputStream(final Queue<Step> steps,final ClonerPutField clonerPutField,final Object subject) throws IOException {
  super(new StepObjectOutput(steps));
  this.steps=steps;
  this.clonerPutField=clonerPutField;
  this.subject=subject;
}
Program: 42985
Project: 42985
Buggy source:
/** 
 * Returns <tt>true</tt> if this map maps one or more keys to the specified value. Note: This method requires a full internal traversal of the hash table, and so is much slower than method <tt>containsKey</tt>.
 * @param value value whose presence in this map is to be tested
 * @return <tt>true</tt> if this map maps one or more keys to thespecified value
 * @throws NullPointerException if the specified value is null
 */
public boolean containsValue(Object value){
  if (value == null)   throw new NullPointerException();
  final Segment<K,V>[] segments=this.segments;
  int[] mc=new int[segments.length];
  for (int k=0; k < RETRIES_BEFORE_LOCK; ++k) {
    int sum=0;
    int mcsum=0;
    for (int i=0; i < segments.length; ++i) {
      int c=segments[i].count;
      mcsum+=mc[i]=segments[i].modCount;
      if (segments[i].containsValue(value))       return true;
    }
    boolean cleanSweep=true;
    if (mcsum != 0) {
      for (int i=0; i < segments.length; ++i) {
        int c=segments[i].count;
        if (mc[i] != segments[i].modCount) {
          cleanSweep=false;
          break;
        }
      }
    }
    if (cleanSweep)     return false;
  }
  for (int i=0; i < segments.length; ++i)   segments[i].lock();
  boolean found=false;
  try {
    for (int i=0; i < segments.length; ++i) {
      if (segments[i].containsValue(value)) {
        found=true;
        break;
      }
    }
  }
  finally {
    for (int i=0; i < segments.length; ++i)     segments[i].unlock();
  }
  return found;
}

Fixed version (ground truth):
/** 
 * Returns <tt>true</tt> if this map maps one or more keys to the specified value. Note: This method requires a full internal traversal of the hash table, and so is much slower than method <tt>containsKey</tt>.
 * @param value value whose presence in this map is to be tested
 * @return <tt>true</tt> if this map maps one or more keys to thespecified value
 * @throws NullPointerException if the specified value is null
 */
public boolean containsValue(Object value){
  if (value == null)   throw new NullPointerException();
  final Segment<K,V>[] segments=this.segments;
  int[] mc=new int[segments.length];
  for (int k=0; k < RETRIES_BEFORE_LOCK; ++k) {
    int mcsum=0;
    for (int i=0; i < segments.length; ++i) {
      mcsum+=mc[i]=segments[i].modCount;
      if (segments[i].containsValue(value))       return true;
    }
    boolean cleanSweep=true;
    if (mcsum != 0) {
      for (int i=0; i < segments.length; ++i) {
        if (mc[i] != segments[i].modCount) {
          cleanSweep=false;
          break;
        }
      }
    }
    if (cleanSweep)     return false;
  }
  for (int i=0; i < segments.length; ++i)   segments[i].lock();
  boolean found=false;
  try {
    for (int i=0; i < segments.length; ++i) {
      if (segments[i].containsValue(value)) {
        found=true;
        break;
      }
    }
  }
  finally {
    for (int i=0; i < segments.length; ++i)     segments[i].unlock();
  }
  return found;
}