nus-yam/ex-repair huggingface dataset:
Program: 37636
Project: 37636
Buggy source:
/** 
 * 在页面打印堆栈信息<br> TODO 500页面内容
 * @param e 异常
 */
public static void render500(Exception e){
  log.error("String_Node_Str",e);
  if (HuluSetting.isDevMode == false) {
    render(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,"String_Node_Str");
  }
  final ByteArrayOutputStream ostr=new ByteArrayOutputStream();
  try {
    e.printStackTrace(new PrintStream(ostr));
    render(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,ostr.toString(HuluSetting.charset).replace("String_Node_Str","String_Node_Str"));
  }
 catch (  IOException e2) {
    log.error("String_Node_Str",e2);
  }
}

Fixed version (ground truth):
/** 
 * 在页面打印堆栈信息<br> TODO 500页面内容
 * @param e 异常
 */
public static void render500(Exception e){
  log.error("String_Node_Str",e);
  if (HuluSetting.isDevMode == false) {
    sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,"String_Node_Str");
    return;
  }
  final StringWriter writer=new StringWriter();
  e.printStackTrace(new PrintWriter(writer));
  render(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,writer.toString().replace("String_Node_Str","String_Node_Str"));
}
Program: 37637
Project: 37637
Buggy source:
public static void render(int errorCode,String errorContent){
  HttpServletResponse response=ActionContext.getResponse();
  response.setStatus(errorCode);
  Render.render(errorContent,Render.CONTENT_TYPE_HTML,response);
}

Fixed version (ground truth):
/** 
 * 将错误发送到容器
 * @param errorCode 错误代码
 * @param errorContent 错误信息
 */
public static void render(int errorCode,String errorContent){
  HttpServletResponse response=ActionContext.getResponse();
  response.setStatus(errorCode);
  Render.render(errorContent,Render.CONTENT_TYPE_HTML,response);
}
Program: 37638
Project: 37638
Buggy source:
@Override int getData1(){
switch (type) {
case X:
case Both:
    return x;
}
return 0;
}

Fixed version (ground truth):
@Override int getData1(){
switch (type) {
case X:
case Both:
    return ax;
}
return 0;
}
Program: 37639
Project: 37639
Buggy source:
@Override int getData2(){
switch (type) {
case Y:
case Both:
    return y;
}
return 0;
}

Fixed version (ground truth):
@Override int getData2(){
switch (type) {
case Y:
case Both:
    return ay;
}
return 0;
}
Program: 37640
Project: 37640
Buggy source:
/** 
 * Sends a stop command out in the binary format.
 * @param out
 * @throws IOException 
 */
public static final void writeStopCommand(DataOutputStream out) throws IOException {
  final int elems=0;
  final int flags=HEADER_FLAG_STOP;
  final float accelX=0;
  final float accelY=0;
  final float accelZ=0;
  final float gyroX=0;
  final float gyroY=0;
  final float gyroZ=0;
  final float reservedX=0;
  final float reservedY=0;
  final float reservedZ=0;
  out.write(HEADER_BYTES);
  out.writeInt(elems);
  out.writeInt(flags);
  out.writeFloat(accelX);
  out.writeFloat(accelY);
  out.writeFloat(accelZ);
  out.writeFloat(gyroX);
  out.writeFloat(gyroY);
  out.writeFloat(gyroZ);
  out.writeFloat(reservedX);
  out.writeFloat(reservedY);
  out.writeFloat(reservedZ);
}

Fixed version (ground truth):
/** 
 * Sends a stop command out in the binary format.
 * @param out
 * @throws IOException 
 */
public static final void writeStopCommand(DataOutputStream out) throws IOException {
  final int elems=0;
  final int flags=HEADER_FLAG_STOP;
  final float accelX=0;
  final float accelY=0;
  final float accelZ=0;
  final float gyroX=0;
  final float gyroY=0;
  final float gyroZ=0;
  final float reservedX=0;
  final float reservedY=0;
  final float reservedZ=0;
  out.write(HEADER_BYTES);
  out.writeInt(elems);
  out.writeInt(flags);
  out.writeFloat(accelX);
  out.writeFloat(accelY);
  out.writeFloat(accelZ);
  out.writeFloat(gyroX);
  out.writeFloat(gyroY);
  out.writeFloat(gyroZ);
  out.writeFloat(reservedX);
  out.writeFloat(reservedY);
  out.writeFloat(reservedZ);
  out.flush();
}
Program: 37642
Project: 37642
Buggy source:
/** 
 * Checks whether mime types is supported by this serializer implementation
 */
@Override public boolean canRead(@Nonnull MediaType mimeType,Type resultType){
  MediaType type=mimeType.withoutParameters();
  return type.is(MediaType.ANY_TEXT_TYPE) || MediaType.APPLICATION_XML_UTF_8.withoutParameters().is(type) || MediaType.JSON_UTF_8.withoutParameters().is(type) && String.class.equals(TypeToken.of(resultType).getRawType());
}

Fixed version (ground truth):
/** 
 * Checks whether mime types is supported by this serializer implementation
 */
@Override public boolean canRead(@Nonnull MediaType mimeType,Type resultType){
  MediaType type=mimeType.withoutParameters();
  return (type.is(MediaType.ANY_TEXT_TYPE) || MediaType.APPLICATION_XML_UTF_8.withoutParameters().is(type) || MediaType.JSON_UTF_8.withoutParameters().is(type)) && String.class.equals(TypeToken.of(resultType).getRawType());
}
Program: 37643
Project: 37643
Buggy source:
/** 
 * Default implementation. May be overridden in subclasses<br> Throws  {@link com.github.avarabyeu.restendpoint.http.exception.RestEndpointClientException}for client exceptions and  {@link com.github.avarabyeu.restendpoint.http.exception.RestEndpointServerException}for server exceptions<br> <p/> Throwed exceptions may be overridden in handle* methods
 */
@Override public void handle(HttpResponse rs) throws RestEndpointIOException {
  if (!hasError(rs)) {
    return;
  }
  StatusType statusType=StatusType.valueOf(rs.getStatusLine().getStatusCode());
  int statusCode=rs.getStatusLine().getStatusCode();
  String statusMessage=rs.getStatusLine().getReasonPhrase();
  byte[] errorBody=getErrorBody(rs);
switch (statusType) {
case CLIENT_ERROR:
    handleClientError(statusCode,statusMessage,errorBody);
  break;
case SERVER_ERROR:
handleServerError(statusCode,statusMessage,errorBody);
break;
default :
handleDefaultError(statusCode,statusMessage,errorBody);
break;
}
}

Fixed version (ground truth):
/** 
 * Default implementation. May be overridden in subclasses<br> Throws  {@link com.github.avarabyeu.restendpoint.http.exception.RestEndpointClientException}for client exceptions and  {@link com.github.avarabyeu.restendpoint.http.exception.RestEndpointServerException}for server exceptions<br> <p/> Throwed exceptions may be overridden in handle* methods
 */
@Override public void handle(HttpResponse rs) throws RestEndpointIOException {
  if (!hasError(rs)) {
    return;
  }
  StatusType statusType=StatusType.valueOf(rs.getStatusLine().getStatusCode());
  int statusCode=rs.getStatusLine().getStatusCode();
  String statusMessage=rs.getStatusLine().getReasonPhrase();
  byte[] errorBody=getErrorBody(rs);
switch (statusType) {
case CLIENT_ERROR:
    handleClientError(statusCode,statusMessage,errorBody);
case SERVER_ERROR:
  handleServerError(statusCode,statusMessage,errorBody);
default :
handleDefaultError(statusCode,statusMessage,errorBody);
}
}
Program: 37644
Project: 37644
Buggy source:
public Merger expand(Map<String,Object> pathParameters){
  Matcher m=PATH_VARIABLE_PATTERN.matcher(template);
  StringBuffer sb=new StringBuffer();
  while (m.find()) {
    Object replacement=pathParameters.get(m.group(1));
    if (null == replacement) {
      throw new RuntimeException("String_Node_Str" + m.group(1));
    }
    m.appendReplacement(sb,Matcher.quoteReplacement(replacement.toString()));
  }
  m.appendTail(sb);
  this.template=new StringBuilder(sb);
  return this;
}

Fixed version (ground truth):
public Merger expand(Map<String,Object> pathParameters){
  Matcher m=PATH_VARIABLE_PATTERN.matcher(template);
  StringBuffer sb=new StringBuffer();
  while (m.find()) {
    Object replacement=pathParameters.get(m.group(1));
    Preconditions.checkState(null != replacement,"String_Node_Str",m.group(1));
    m.appendReplacement(sb,Matcher.quoteReplacement(replacement.toString()));
  }
  m.appendTail(sb);
  this.template=new StringBuilder(sb);
  return this;
}
Program: 37645
Project: 37645
Buggy source:
/** 
 * Default   {@link com.github.avarabyeu.restendpoint.http.RestEndpoint} binding
 * @param serializer
 * @return
 */
@Provides public RestEndpoint provideRestEndpoint(Serializer serializer){
  return new HttpClientRestEndpoint(HttpAsyncClients.createDefault(),Lists.<Serializer>newArrayList(new StringSerializer(),new ByteArraySerializer()),new DefaultErrorHandler(),"String_Node_Str" + MOCK_PORT);
}

Fixed version (ground truth):
/** 
 * Default   {@link com.github.avarabyeu.restendpoint.http.RestEndpoint} binding
 * @return
 */
@Provides public RestEndpoint provideRestEndpoint(ErrorHandler<HttpResponse> errorHandler){
  return new HttpClientRestEndpoint(HttpAsyncClients.createDefault(),Lists.newArrayList(new StringSerializer(),new ByteArraySerializer()),errorHandler,"String_Node_Str" + MOCK_PORT);
}
Program: 37646
Project: 37646
Buggy source:
@Override public void configure(Binder binder){
  binder.bind(new Key<ErrorHandler<HttpResponse>>(){
  }
).to(DefaultErrorHandler.class).in(Scopes.SINGLETON);
  binder.bind(MockWebServer.class).in(Scopes.NO_SCOPE);
  MockWebServer mockWebServer=new MockWebServer();
  mockWebServer.setDispatcher(new QueueDispatcher(){
    @Override public MockResponse dispatch(    RecordedRequest request) throws InterruptedException {
      Uninterruptibles.sleepUninterruptibly(5l,TimeUnit.SECONDS);
      return super.dispatch(request);
    }
  }
);
  binder.bind(MockWebServer.class).annotatedWith(Names.named("String_Node_Str")).toInstance(mockWebServer);
}

Fixed version (ground truth):
@Override public void configure(Binder binder){
  binder.bind(new Key<ErrorHandler<HttpResponse>>(){
  }
).to(DefaultErrorHandler.class).in(Scopes.SINGLETON);
  binder.bind(MockWebServer.class).in(Scopes.NO_SCOPE);
}
Program: 37647
Project: 37647
Buggy source:
public RestCommand(String uri,HttpMethod method,RQ request,Type responseType){
  this.httpMethod=method;
  this.request=request;
  this.uri=uri;
  this.responseType=responseType;
  validate();
}

Fixed version (ground truth):
public RestCommand(@Nonnull String uri,@Nonnull HttpMethod method,@Nullable RQ request,@Nonnull Type responseType){
  this.httpMethod=method;
  this.request=request;
  this.uri=uri;
  this.responseType=responseType;
  validate();
}
Program: 37648
Project: 37648
Buggy source:
private void validate(){
  if (HttpMethod.GET.equals(this.httpMethod) && null != this.request) {
    throw new RuntimeException("String_Node_Str");
  }
}

Fixed version (ground truth):
private void validate(){
  if (!this.httpMethod.hasBody()) {
    Preconditions.checkState(null == this.request,"String_Node_Str",this.httpMethod);
  }
}
Program: 37649
Project: 37649
Buggy source:
private static void writeFile(String path,String name,String content){
  try {
    File file=new File(path + separator + name);
    Writer output=new BufferedWriter(new FileWriter(file));
    output.write(content);
    output.close();
  }
 catch (  Exception ex) {
    ex.printStackTrace();
  }
}

Fixed version (ground truth):
public static void writeFile(String path,String name,String content){
  try {
    File file=new File(path + separator + name);
    Writer output=new BufferedWriter(new FileWriter(file));
    output.write(content);
    output.close();
  }
 catch (  Exception ex) {
    ex.printStackTrace();
  }
}
Program: 37650
Project: 37650
Buggy source:
static void addRowToTape(String tapePath,String rowStr){
  try {
    RandomAccessFile file=new RandomAccessFile(new File(tapePath),"String_Node_Str");
    int len=(int)file.length();
    byte[] buffer=new byte[len];
    file.readFully(buffer);
    int lineCount=0;
    for (int idx=0; idx < len; idx++) {
      if (buffer[idx] == '\n') {
        lineCount++;
      }
    }
    int curLine=0;
    int buffIdx=0;
    for (; buffIdx < len; buffIdx++) {
      if (buffer[buffIdx] == '\n') {
        if (++curLine == lineCount - 1) {
          file.seek(0);
          file.write(buffer,0,++buffIdx);
          break;
        }
      }
    }
    rowStr=rowStr.concat("String_Node_Str");
    file.writeBytes(rowStr);
    file.write(buffer,buffIdx,len - buffIdx);
    file.close();
  }
 catch (  Exception ex) {
    ex.printStackTrace();
  }
}

Fixed version (ground truth):
static void addRowToTape(String tapePath,String rowStr){
  File tmpFile=new File(tapePath);
  if (!tmpFile.exists() || tmpFile.isDirectory() || tmpFile.length() == 0) {
    return;
  }
  try {
    RandomAccessFile file=new RandomAccessFile(new File(tapePath),"String_Node_Str");
    int len=(int)file.length();
    byte[] buffer=new byte[len];
    file.readFully(buffer);
    int lineCount=0;
    for (int idx=0; idx < len; idx++) {
      if (buffer[idx] == '\n') {
        lineCount++;
      }
    }
    int curLine=0;
    int buffIdx=0;
    for (; buffIdx < len; buffIdx++) {
      if (buffer[buffIdx] == '\n') {
        if (++curLine == lineCount - 1) {
          file.seek(0);
          file.write(buffer,0,++buffIdx);
          break;
        }
      }
    }
    rowStr=rowStr.concat("String_Node_Str");
    file.writeBytes(rowStr);
    file.write(buffer,buffIdx,len - buffIdx);
    file.close();
  }
 catch (  Exception ex) {
    ex.printStackTrace();
  }
}
Program: 37651
Project: 37651
Buggy source:
static boolean assemble(){
  try {
    Simulator.kill();
    new File(AssemblerOptions.objectPath).delete();
    new File(AssemblerOptions.tapePath).delete();
    new File(AssemblerOptions.diagnosticPath).delete();
    new File(AssemblerOptions.listingPath).delete();
    new File(RopeUtils.removeExtension(AssemblerOptions.sourcePath) + "String_Node_Str").delete();
    if (AssemblerOptions.tape && AssemblerOptions.tapeEncoding && !AssemblerOptions.tapeEncodingChoice.equals(AssemblerOptions.deckEncodingChoice)) {
      buildTape();
      addRowToTape(AssemblerOptions.tapePath,"String_Node_Str");
      buildDeck();
    }
 else {
      buildAssembly();
      addRowToTape(AssemblerOptions.tapePath,"String_Node_Str");
    }
    process=null;
    return true;
  }
 catch (  Exception ex) {
    ex.printStackTrace();
    return false;
  }
}

Fixed version (ground truth):
static boolean assemble(){
  try {
    Simulator.kill();
    File objFile=new File(AssemblerOptions.objectPath);
    File tapeFile=new File(AssemblerOptions.tapePath);
    File diagFile=new File(AssemblerOptions.diagnosticPath);
    File listFile=new File(AssemblerOptions.listingPath);
    File outFile=new File(RopeUtils.removeExtension(AssemblerOptions.sourcePath) + "String_Node_Str");
    objFile.delete();
    tapeFile.delete();
    diagFile.delete();
    listFile.delete();
    outFile.delete();
    if (AssemblerOptions.tape && AssemblerOptions.tapeEncoding && !AssemblerOptions.tapeEncodingChoice.equals(AssemblerOptions.deckEncodingChoice)) {
      buildTape();
      addRowToTape(AssemblerOptions.tapePath,"String_Node_Str");
      buildDeck();
    }
 else {
      buildAssembly();
      addRowToTape(AssemblerOptions.tapePath,"String_Node_Str");
    }
    if (objFile.exists() && objFile.length() == 0) {
      objFile.delete();
    }
    if (tapeFile.exists() && tapeFile.length() == 0) {
      tapeFile.delete();
    }
    if (diagFile.exists() && diagFile.length() == 0) {
      diagFile.delete();
    }
    if (listFile.exists() && listFile.length() == 0) {
      listFile.delete();
    }
    if (outFile.exists() && outFile.length() == 0) {
      outFile.delete();
    }
    process=null;
    return true;
  }
 catch (  Exception ex) {
    ex.printStackTrace();
    return false;
  }
}
Program: 37653
Project: 37653
Buggy source:
private void assembleAction(){
  String line;
  messages=new ArrayList();
  removeAssemblerFiles(sourcePath);
  mainFrame.resetExecWindow();
  saveAction();
  assembleFailed=false;
  haveAssemblyErrors=false;
  if (Assembler.version()) {
    while ((line=Assembler.output()) != null) {
      messages.add(line);
    }
    Assembler.setPaths(baseName,sourcePath);
    if (Assembler.assemble()) {
      while ((line=Assembler.output()) != null) {
        System.out.println(line);
        messages.add(line);
        if (line.startsWith("String_Node_Str")) {
          haveAssemblyErrors=true;
        }
      }
      messageList.setListData(messages.toArray());
      messageList.ensureIndexIsVisible(0);
      mainFrame.showExecWindow(baseName);
    }
 else {
      assembleFailed=true;
    }
  }
 else {
    assembleFailed=true;
  }
  if (assembleFailed) {
    String message=String.format("String_Node_Str",AssemblerOptions.assemblerPath);
    System.out.println(message);
    JOptionPane.showMessageDialog(this,message,"String_Node_Str",JOptionPane.ERROR_MESSAGE);
  }
}

Fixed version (ground truth):
private void assembleAction(){
  String line;
  messages=new ArrayList();
  mainFrame.resetExecWindow();
  saveAction();
  assembleFailed=false;
  haveAssemblyErrors=false;
  if (Assembler.version()) {
    while ((line=Assembler.output()) != null) {
      messages.add(line);
    }
    Assembler.setPaths(baseName,sourcePath);
    if (Assembler.assemble()) {
      while ((line=Assembler.output()) != null) {
        System.out.println(line);
        messages.add(line);
        if (line.startsWith("String_Node_Str")) {
          haveAssemblyErrors=true;
        }
      }
      messageList.setListData(messages.toArray());
      messageList.ensureIndexIsVisible(0);
      mainFrame.showExecWindow(baseName);
    }
 else {
      assembleFailed=true;
    }
  }
 else {
    assembleFailed=true;
  }
  if (assembleFailed) {
    String message=String.format("String_Node_Str",AssemblerOptions.assemblerPath);
    System.out.println(message);
    JOptionPane.showMessageDialog(this,message,"String_Node_Str",JOptionPane.ERROR_MESSAGE);
  }
}
Program: 37654
Project: 37654
Buggy source:
void removeAssemblerFiles(String sourcePath){
  if (sourcePath == null || sourcePath.length() == 0) {
    return;
  }
  String basePath="String_Node_Str";
  int endIndex=sourcePath.lastIndexOf("String_Node_Str");
  if (endIndex != -1) {
    basePath=sourcePath.substring(0,endIndex);
  }
  System.out.println(basePath);
  try {
    File file=new File(basePath + "String_Node_Str");
    if (file.exists()) {
      file.delete();
    }
    file=new File(basePath + "String_Node_Str");
    if (file.exists()) {
      file.delete();
    }
    file=new File(basePath + "String_Node_Str");
    if (file.exists()) {
      file.delete();
    }
  }
 catch (  Exception ex) {
    ex.printStackTrace();
  }
}

Fixed version (ground truth):
void removeAssemblerFiles(String sourcePath){
  if (sourcePath == null || sourcePath.length() == 0) {
    return;
  }
  String basePath="String_Node_Str";
  int endIndex=sourcePath.lastIndexOf("String_Node_Str");
  if (endIndex != -1) {
    basePath=sourcePath.substring(0,endIndex);
  }
  System.out.println(basePath);
  try {
    File file=new File(basePath + "String_Node_Str");
    if (file.exists()) {
      file.delete();
    }
    file=new File(basePath + "String_Node_Str");
    if (file.exists()) {
      file.delete();
    }
    file=new File(basePath + "String_Node_Str");
    if (file.exists()) {
      file.delete();
    }
    file=new File(basePath + "String_Node_Str");
    if (file.exists()) {
      file.delete();
    }
    file=new File(basePath + "String_Node_Str");
    if (file.exists()) {
      file.delete();
    }
  }
 catch (  Exception ex) {
    ex.printStackTrace();
  }
}
Program: 37655
Project: 37655
Buggy source:
public static boolean renameAndDelete(File file){
  String filePath=pathComponent(file.getParent());
  String fileName=getFileName(file.getParent());
  String timeStr="String_Node_Str" + System.currentTimeMillis();
  String renamed=filePath + removeExtension(fileName) + "String_Node_Str"+ timeStr+ "String_Node_Str"+ getExtension(fileName);
  File renamedFile=new File(renamed);
  file.renameTo(renamedFile);
  renamedFile.delete();
  if (renamedFile.exists()) {
    renamedFile.setWritable(false);
    renamedFile.delete();
    if (renamedFile.exists()) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
public static boolean renameAndDelete(File file){
  String filePath=pathComponent(file.getPath());
  String fileName=getFileName(file.getPath());
  String timeStr="String_Node_Str" + System.currentTimeMillis();
  String renamed=filePath + removeExtension(fileName) + "String_Node_Str"+ timeStr+ "String_Node_Str"+ getExtension(fileName);
  File renamedFile=new File(renamed);
  file.renameTo(renamedFile);
  renamedFile.delete();
  if (renamedFile.exists()) {
    renamedFile.setWritable(false);
    renamedFile.delete();
    if (renamedFile.exists()) {
      return false;
    }
  }
  return true;
}
Program: 37656
Project: 37656
Buggy source:
public void saveAction(){
  BufferedWriter sourceFile=null;
  try {
    Boolean removedInvalidChars=false;
    String cleanText=cleanupSource(sourceArea.getText(),removedInvalidChars);
    int caretPos=sourceArea.getCaretPosition();
    sourceArea.setText(cleanText);
    sourceArea.setCaretPosition(caretPos);
    if (removedInvalidChars) {
      String message=String.format("String_Node_Str");
      JOptionPane.showMessageDialog(this,message,"String_Node_Str",JOptionPane.INFORMATION_MESSAGE);
    }
    sourceFile=new BufferedWriter(new FileWriter(sourcePath,false));
    sourceFile.write(cleanText);
    setSourceChanged(false);
    setupMenus();
  }
 catch (  Exception ex) {
    ex.printStackTrace();
  }
 finally {
    if (sourceFile != null) {
      try {
        sourceFile.close();
      }
 catch (      IOException ignore) {
      }
    }
  }
}

Fixed version (ground truth):
public void saveAction(){
  BufferedWriter sourceFile=null;
  try {
    BoolRef removedInvalidChars=new BoolRef(false);
    String cleanText=cleanupSource(sourceArea.getText(),removedInvalidChars);
    int caretPos=sourceArea.getCaretPosition();
    sourceArea.setText(cleanText);
    sourceArea.setCaretPosition(caretPos > cleanText.length() ? cleanText.length() : caretPos);
    if (removedInvalidChars.value) {
      String message=String.format("String_Node_Str");
      JOptionPane.showMessageDialog(this,message,"String_Node_Str",JOptionPane.INFORMATION_MESSAGE);
    }
    sourceFile=new BufferedWriter(new FileWriter(sourcePath,false));
    sourceFile.write(cleanText);
    setSourceChanged(false);
    setupMenus();
  }
 catch (  Exception ex) {
    ex.printStackTrace();
  }
 finally {
    if (sourceFile != null) {
      try {
        sourceFile.close();
      }
 catch (      IOException ignore) {
      }
    }
  }
}
Program: 37660
Project: 37660
Buggy source:
private void startAction(){
  if (programRunning) {
synchronized (Simulator.class) {
      Simulator.execute("String_Node_Str");
      processOutput(true);
    }
  }
 else {
synchronized (Simulator.class) {
      Simulator.execute("String_Node_Str");
      processOutput(false);
    }
    dataButton.setEnabled(false);
    quitButton.setEnabled(true);
    singleStepButton.setEnabled(true);
    autoStepButton.setEnabled(true);
    programRunning=true;
  }
  mainFrame.updateCommandWindows();
  mainFrame.enableSenseSwitches();
  if (Simulator.isBusy()) {
    startButton.setText("String_Node_Str");
    quitButton.setEnabled(false);
    singleStepButton.setEnabled(false);
    autoStepButton.setEnabled(false);
  }
 else {
    startButton.setText("String_Node_Str");
  }
}

Fixed version (ground truth):
private void startAction(){
  if (programRunning) {
synchronized (Simulator.class) {
      Simulator.execute("String_Node_Str");
      processOutput(true);
    }
  }
 else {
synchronized (Simulator.class) {
      Simulator.execute("String_Node_Str");
      processOutput(false);
    }
    dataButton.setEnabled(false);
    quitButton.setEnabled(true);
    singleStepButton.setEnabled(true);
    autoStepButton.setEnabled(true);
    programRunning=true;
  }
  mainFrame.updateCommandWindows();
  mainFrame.enableSenseSwitches();
  if (Simulator.isBusy()) {
    startButton.setText("String_Node_Str");
    quitButton.setEnabled(false);
    singleStepButton.setEnabled(false);
    autoStepButton.setEnabled(false);
  }
 else {
    startButton.setText("String_Node_Str");
    quitButton.setEnabled(true);
    singleStepButton.setEnabled(true);
    autoStepButton.setEnabled(true);
  }
}
Program: 37661
Project: 37661
Buggy source:
@Override public void mouseReleased(MouseEvent event){
  if (settingBreakpoint && event.getX() <= 16) {
    flipBreakpoint(listing.locationToIndex(event.getPoint()));
  }
 else {
    Point mouseLoc=event.getPoint();
    int idx=listing.locationToIndex(mouseLoc);
    if (idx >= 0) {
      Rectangle bounds=listing.getCellBounds(idx,idx);
      if (bounds.contains(mouseLoc)) {
        if (listing.getSelectedIndex() != idx) {
          ListingLine line=(ListingLine)listing.getModel().getElementAt(idx);
          if (line.breakable) {
            listing.setSelectedIndex(idx);
          }
        }
      }
    }
  }
  repaint();
  settingBreakpoint=false;
}

Fixed version (ground truth):
@Override public void mouseReleased(MouseEvent event){
  if (settingBreakpoint && event.getX() <= 16) {
    flipBreakpoint(listing.locationToIndex(event.getPoint()));
  }
 else {
  }
  repaint();
  settingBreakpoint=false;
}
Program: 37663
Project: 37663
Buggy source:
private void loadListing(){
  clearListing();
  ArrayList v=filterListing();
  if (v != null) {
    listing.setListData(v.toArray());
    if (currentMessage == null) {
      listing.ensureIndexIsVisible(0);
    }
 else {
      selectCurrentLine(currentMessage);
    }
    checkListContent();
  }
}

Fixed version (ground truth):
private void loadListing(){
  clearListing();
  if (filterListing() != null) {
    listing.setListData(filterListing().toArray());
    if (currentMessage == null) {
      listing.ensureIndexIsVisible(0);
    }
 else {
      selectCurrentLine(currentMessage);
    }
    checkListContent();
  }
}
Program: 37664
Project: 37664
Buggy source:
static void kill(){
  if (process != null) {
    process.destroy();
    System.out.println("String_Node_Str");
    isActive=false;
    isBusy=false;
  }
}

Fixed version (ground truth):
static void kill(){
  if (process != null) {
    process.destroy();
    System.out.println("String_Node_Str");
    isActive=false;
  }
}
Program: 37665
Project: 37665
Buggy source:
static String output(){
  try {
    String output="String_Node_Str";
    if (stdout.ready()) {
      output=stdout.readLine();
      isBusy=false;
    }
 else {
      isBusy=true;
    }
    simulatorElapsedTime+=System.currentTimeMillis() - simulatorStartTime;
    simulatorStartTime=System.currentTimeMillis();
    if (output.length() > 0) {
      System.out.println(output);
    }
    return output;
  }
 catch (  IOException ex) {
    ex.printStackTrace();
    return null;
  }
}

Fixed version (ground truth):
static String output(){
  try {
    String output="String_Node_Str";
    if (stdout.ready()) {
      isBusy=true;
      output=stdout.readLine();
      isBusy=false;
    }
    simulatorElapsedTime+=System.currentTimeMillis() - simulatorStartTime;
    simulatorStartTime=System.currentTimeMillis();
    if (output.length() > 0) {
      System.out.println(output);
    }
    return output;
  }
 catch (  IOException ex) {
    ex.printStackTrace();
    return null;
  }
}
Program: 37667
Project: 37667
Buggy source:
public MemoryFrame(RopeFrame parent){
  super(parent);
  setLocation(930,690);
  setSize(510,395);
  try {
    jbInit();
  }
 catch (  Exception ex) {
    ex.printStackTrace();
  }
  this.addInternalFrameListener(new InternalFrameAdapter(){
    @Override public void internalFrameClosed(    InternalFrameEvent event){
      savePreferences();
      mainFrame.removeMemoryFrame();
    }
  }
);
  this.addComponentListener(new ComponentAdapter(){
    @Override public void componentHidden(    ComponentEvent e){
      System.out.println("String_Node_Str");
    }
    @Override public void componentShown(    ComponentEvent e){
      System.out.println("String_Node_Str");
    }
  }
);
  showButton.addActionListener(this);
  barsCheckBox.addChangeListener(this);
  DefaultCaret caret=(DefaultCaret)memoryArea.getCaret();
  caret.setUpdatePolicy(DefaultCaret.NEVER_UPDATE);
  showMemory();
}

Fixed version (ground truth):
public MemoryFrame(RopeFrame parent){
  super(parent);
  setLocation(930,690);
  setSize(508,395);
  try {
    jbInit();
  }
 catch (  Exception ex) {
    ex.printStackTrace();
  }
  this.addInternalFrameListener(new InternalFrameAdapter(){
    @Override public void internalFrameClosed(    InternalFrameEvent event){
      savePreferences();
      mainFrame.removeMemoryFrame();
    }
  }
);
  this.addComponentListener(new ComponentAdapter(){
    @Override public void componentHidden(    ComponentEvent e){
      System.out.println("String_Node_Str");
    }
    @Override public void componentShown(    ComponentEvent e){
      System.out.println("String_Node_Str");
    }
  }
);
  showButton.addActionListener(this);
  barsCheckBox.addChangeListener(this);
  DefaultCaret caret=(DefaultCaret)memoryArea.getCaret();
  caret.setUpdatePolicy(DefaultCaret.NEVER_UPDATE);
  showMemory();
}
Program: 37669
Project: 37669
Buggy source:
static boolean assemble(){
  try {
    Simulator.kill();
    if (AssemblerOptions.tape && AssemblerOptions.tapeEncoding && AssemblerOptions.tapeEncodingChoice != AssemblerOptions.deckEncodingChoice) {
      String[] tapeArgs=buildCommand(false).toArray(new String[0]);
      process=Runtime.getRuntime().exec(tapeArgs);
      stdout=new BufferedReader(new InputStreamReader(process.getInputStream()));
      String[] deckArgs=buildCommand(true).toArray(new String[0]);
      process=Runtime.getRuntime().exec(deckArgs);
      stdout=new BufferedReader(new InputStreamReader(process.getInputStream()));
    }
 else {
      String[] args=AssemblerOptions.command.toArray(new String[0]);
      args[0]=AssemblerOptions.assemblerPath;
      process=Runtime.getRuntime().exec(args);
      stdout=new BufferedReader(new InputStreamReader(process.getInputStream()));
    }
    process=null;
    if (AssemblerOptions.tape && AssemblerOptions.convertTapeForTapeSimulator) {
      convertTape(AssemblerOptions.tapePath);
    }
    return true;
  }
 catch (  IOException ex) {
    ex.printStackTrace();
    return false;
  }
}

Fixed version (ground truth):
static boolean assemble(){
  try {
    Simulator.kill();
    if (AssemblerOptions.tape && AssemblerOptions.tapeEncoding && AssemblerOptions.tapeEncodingChoice != AssemblerOptions.deckEncodingChoice) {
      String[] tapeArgs=buildCommand(false).toArray(new String[0]);
      process=Runtime.getRuntime().exec(tapeArgs);
      stdout=new BufferedReader(new InputStreamReader(process.getInputStream()));
      try {
        process.waitFor();
      }
 catch (      Exception ex) {
      }
      if (AssemblerOptions.tape && AssemblerOptions.convertTapeForTapeSimulator) {
        convertTape(AssemblerOptions.tapePath);
      }
      String[] deckArgs=buildCommand(true).toArray(new String[0]);
      process=Runtime.getRuntime().exec(deckArgs);
      stdout=new BufferedReader(new InputStreamReader(process.getInputStream()));
    }
 else {
      String[] args=AssemblerOptions.command.toArray(new String[0]);
      args[0]=AssemblerOptions.assemblerPath;
      process=Runtime.getRuntime().exec(args);
      stdout=new BufferedReader(new InputStreamReader(process.getInputStream()));
      if (AssemblerOptions.tape && AssemblerOptions.convertTapeForTapeSimulator) {
        try {
          process.waitFor();
        }
 catch (        Exception ex) {
        }
        convertTape(AssemblerOptions.tapePath);
      }
    }
    process=null;
    return true;
  }
 catch (  IOException ex) {
    ex.printStackTrace();
    return false;
  }
}
Program: 37671
Project: 37671
Buggy source:
@Override public void stateChanged(ChangeEvent event){
  Object source=event.getSource();
  if ((source == bootCheckBox) || (source == bootIBMRadioButton)) {
    enableBoot();
  }
 else   if ((source == listingCheckBox) || (source == objectCheckBox)) {
    enableListing();
    enableObject();
    enableInterleave();
  }
 else   if (source == pageCheckBox) {
    pageText.setEnabled(pageCheckBox.isSelected());
  }
 else   if (source == traceCheckBox) {
    enableTrace();
  }
 else   if (source == extrasCheckBox) {
    enableExtras();
  }
 else   if (source == macroCheckBox) {
    enableMacro();
  }
 else   if (source == tapeCheckBox) {
    enableTape();
  }
 else   if (source == diagnosticCheckBox) {
    enableDiagnostic();
  }
 else   if (source == deckEncodingCheckBox) {
    enableDeckEncoding();
  }
 else   if (source == tapeEncodingCheckBox) {
    enableTapeEncoding();
  }
  buildCommand();
}

Fixed version (ground truth):
@Override public void stateChanged(ChangeEvent event){
  Object source=event.getSource();
  if ((source == bootCheckBox) || (source == bootIBMRadioButton)) {
    enableBoot();
  }
 else   if ((source == listingCheckBox) || (source == objectCheckBox)) {
    enableListing();
    enableObject();
    enableInterleave();
  }
 else   if (source == pageCheckBox) {
    pageText.setEnabled(pageCheckBox.isSelected());
  }
 else   if (source == traceCheckBox) {
    enableTrace();
  }
 else   if (source == extrasCheckBox) {
    enableExtras();
  }
 else   if (source == macroCheckBox) {
    enableMacro();
  }
 else   if (source == tapeCheckBox) {
    enableTape();
  }
 else   if (source == diagnosticCheckBox) {
    enableDiagnostic();
  }
 else   if (source == deckEncodingCheckBox) {
    enableDeckEncoding();
  }
 else   if (source == tapeEncodingCheckBox) {
    enableTapeEncoding();
  }
 else   if (source == convertTapeForTapeSimulatorBox) {
    enableTapeConversion();
  }
  buildCommand();
}
Program: 37675
Project: 37675
Buggy source:
ChildFrame(RopeFrame ropeFrame){
  mainFrame=ropeFrame;
  addInternalFrameListener(this);
}

Fixed version (ground truth):
ChildFrame(RopeFrame ropeFrame){
  mainFrame=ropeFrame;
  addInternalFrameListener(this);
  addComponentListener(this);
}
Program: 37676
Project: 37676
Buggy source:
public void setupMenus(){
  mainFrame.undoItem.setEnabled(canUndo());
  mainFrame.redoItem.setEnabled(canRedo());
  mainFrame.cutItem.setEnabled(canCut());
  mainFrame.copyItem.setEnabled(canCopy());
  mainFrame.pasteItem.setEnabled(canPaste());
  mainFrame.deleteItem.setEnabled(canDelete());
  mainFrame.selectAllItem.setEnabled(canSelectAll());
  mainFrame.selectLineItem.setEnabled(canSelectLine());
}

Fixed version (ground truth):
public void setupMenus(){
  mainFrame.newItem.setEnabled(canNew());
  mainFrame.openItem.setEnabled(canOpen());
  mainFrame.saveItem.setEnabled(canSave());
  mainFrame.saveAsItem.setEnabled(canSaveAs());
  mainFrame.revertItem.setEnabled(canRevert());
  mainFrame.closeItem.setEnabled(canClose());
  mainFrame.printItem.setEnabled(canPrint());
  mainFrame.undoItem.setEnabled(canUndo());
  mainFrame.redoItem.setEnabled(canRedo());
  mainFrame.cutItem.setEnabled(canCut());
  mainFrame.copyItem.setEnabled(canCopy());
  mainFrame.pasteItem.setEnabled(canPaste());
  mainFrame.deleteItem.setEnabled(canDelete());
  mainFrame.selectAllItem.setEnabled(canSelectAll());
  mainFrame.selectLineItem.setEnabled(canSelectLine());
  if (RopeHelper.isMac) {
  }
 else {
    mainFrame.prefsItem.setEnabled(canPrefs());
    mainFrame.quitItem.setEnabled(canQuit());
    mainFrame.aboutItem.setEnabled(canAbout());
  }
}
Program: 37677
Project: 37677
Buggy source:
public Rope(){
  if (RopeHelper.isMac) {
    System.setProperty("String_Node_Str","String_Node_Str");
  }
  Runtime.getRuntime().addShutdownHook(new Thread(){
    @Override public void run(){
      if (mainFrame != null && !mainFrame.closed()) {
        mainFrame.savePreferences();
      }
      Assembler.kill();
      Simulator.kill();
    }
  }
);
  mainFrame=new RopeFrame();
}

Fixed version (ground truth):
public Rope(){
  if (RopeHelper.isMac) {
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    setQuitStrategy(QuitStrategy.SYSTEM_EXIT_0);
  }
  try {
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
  }
 catch (  Exception ex) {
  }
  Runtime.getRuntime().addShutdownHook(new Thread(){
    @Override public void run(){
      if (mainFrame != null && !mainFrame.closed()) {
        mainFrame.savePreferences();
      }
      Assembler.kill();
      Simulator.kill();
    }
  }
);
  mainFrame=new RopeFrame();
}
Program: 37678
Project: 37678
Buggy source:
@Override public void windowOpened(WindowEvent e){
  loadPreferences();
  if (reopenLastSource) {
    File file=new File(userPrefs.get("String_Node_Str",null));
    if (editFrame.loadSourceFile(file)) {
      String sourceName=file.getName();
      int idx=sourceName.lastIndexOf("String_Node_Str");
      String baseName=idx == -1 ? sourceName.substring(0) : sourceName.substring(0,idx);
      showExecWindow(baseName);
    }
  }
}

Fixed version (ground truth):
@Override public void windowOpened(WindowEvent e){
  loadPreferences();
  if (reopenLastSource) {
    File file=new File(userPrefs.get("String_Node_Str",null));
    if (editFrame.loadSourceFile(file)) {
      String sourceName=file.getName();
      int idx=sourceName.lastIndexOf("String_Node_Str");
      String baseName=idx == -1 ? sourceName.substring(0) : sourceName.substring(0,idx);
      showExecWindow(baseName);
    }
  }
  currentChildFrame=editFrame;
  desktop.getDesktopManager().activateFrame(editFrame);
}
Program: 37680
Project: 37680
Buggy source:
void verifyFrameLocation(Point frameLocation){
  Dimension ropeFrameSize=getSize();
  if (frameLocation.getX() < 0 || frameLocation.getY() < 0) {
    frameLocation.setLocation(0,0);
  }
 else   if (frameLocation.getX() > ropeFrameSize.getWidth() - 20 || frameLocation.getY() > ropeFrameSize.getHeight() - 20) {
    frameLocation.setLocation(ropeFrameSize.getWidth() - 20,ropeFrameSize.getHeight() - 20);
  }
}

Fixed version (ground truth):
void verifyFrameLocation(Point frameLocation){
  Dimension ropeFrameSize=getSize();
  if (frameLocation.y < -4) {
    frameLocation.y=-4;
  }
  if (frameLocation.x > ropeFrameSize.width - 20) {
    frameLocation.x=ropeFrameSize.width - 20;
  }
  if (frameLocation.y > ropeFrameSize.height - 20) {
    frameLocation.y=ropeFrameSize.height - 20;
  }
}
Program: 37682
Project: 37682
Buggy source:
private void browseAction(){
  if (selectedPath == null) {
    selectedPath=System.getenv("String_Node_Str");
    if (selectedPath != null) {
      File dir=new File(selectedPath);
      if (!dir.exists() || !dir.isDirectory()) {
        String message=String.format("String_Node_Str",selectedPath);
        JOptionPane.showMessageDialog(null,message,"String_Node_Str",JOptionPane.WARNING_MESSAGE);
        selectedPath=null;
      }
 else {
        System.out.println("String_Node_Str" + selectedPath);
      }
    }
    if (selectedPath == null) {
      selectedPath=System.getProperty("String_Node_Str");
      System.out.println("String_Node_Str" + selectedPath);
    }
  }
  Vector<RopeFileFilter> filters=new Vector<RopeFileFilter>();
  filters.add(new RopeFileFilter(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"},"String_Node_Str"));
  filters.add(new RopeFileFilter(new String[]{"String_Node_Str","String_Node_Str"},"String_Node_Str"));
  filters.add(new RopeFileFilter(new String[]{"String_Node_Str"},"String_Node_Str"));
  RopeFileChooser chooser=new RopeFileChooser(selectedPath,null,filters);
  chooser.setDialogTitle("String_Node_Str");
  chooser.setFileFilter(filters.firstElement());
  chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
  File file=chooser.choose(fileText,this);
  if (file != null) {
    loadSourceFile(file);
  }
}

Fixed version (ground truth):
private void browseAction(){
  if (selectedPath == null) {
    selectedPath=System.getenv("String_Node_Str");
    if (selectedPath != null) {
      File dir=new File(selectedPath);
      if (!dir.exists() || !dir.isDirectory()) {
        String message=String.format("String_Node_Str",selectedPath);
        JOptionPane.showMessageDialog(null,message,"String_Node_Str",JOptionPane.WARNING_MESSAGE);
        selectedPath=null;
      }
 else {
        System.out.println("String_Node_Str" + selectedPath);
      }
    }
    if (selectedPath == null) {
      selectedPath=System.getProperty("String_Node_Str");
      System.out.println("String_Node_Str" + selectedPath);
    }
  }
  Vector<RopeFileFilter> filters=new Vector<RopeFileFilter>();
  filters.add(new RopeFileFilter(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"},"String_Node_Str"));
  filters.add(new RopeFileFilter(new String[]{"String_Node_Str","String_Node_Str"},"String_Node_Str"));
  filters.add(new RopeFileFilter(new String[]{"String_Node_Str"},"String_Node_Str"));
  RopeFileChooser chooser=new RopeFileChooser(selectedPath,null,filters);
  chooser.setDialogTitle("String_Node_Str");
  chooser.setFileFilter(filters.firstElement());
  chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
  File file=chooser.choose(fileText,this);
  if (file != null) {
    if (loadSourceFile(file)) {
      mainFrame.showExecWindow(baseName);
    }
  }
}
Program: 37683
Project: 37683
Buggy source:
private void clearBreakpoints(){
  ListModel model=listing.getModel();
  int size=model.getSize();
  for (int idx=0; idx < size; ++idx) {
    ListingLine line=(ListingLine)model.getElementAt(idx);
    line.breakpoint=false;
  }
  listing.repaint();
  listing.removeAll();
}

Fixed version (ground truth):
public void clearBreakpoints(){
  ListModel model=listing.getModel();
  int size=model.getSize();
  for (int idx=0; idx < size; ++idx) {
    ListingLine line=(ListingLine)model.getElementAt(idx);
    line.breakpoint=false;
  }
  listing.repaint();
  listing.removeAll();
}
Program: 37684
Project: 37684
Buggy source:
private void loadListing(){
  Vector v=filterListing();
  if (v != null) {
    listing.clearSelection();
    listing.setListData(v);
    if (currentMessage == null) {
      listing.ensureIndexIsVisible(0);
    }
 else {
      selectCurrentLine(currentMessage);
    }
    checkListContent();
  }
}

Fixed version (ground truth):
private void loadListing(){
  clearListing();
  Vector v=filterListing();
  if (v != null) {
    listing.setListData(v);
    if (currentMessage == null) {
      listing.ensureIndexIsVisible(0);
    }
 else {
      selectCurrentLine(currentMessage);
    }
    checkListContent();
  }
}
Program: 37685
Project: 37685
Buggy source:
void showExecWindow(String baseName){
  desktop.getDesktopManager().deiconifyFrame(execFrame);
  execFrame.setTitle("String_Node_Str" + baseName);
  execFrame.setVisible(true);
  execFrame.initialize(AssemblerOptions.listingPath,DataOptions.outputPath);
  execFrame.toFront();
}

Fixed version (ground truth):
void showExecWindow(String baseName){
  File file=new File(AssemblerOptions.listingPath);
  if (file.exists()) {
    execFrame.setTitle("String_Node_Str" + baseName);
    execFrame.initialize(AssemblerOptions.listingPath,DataOptions.outputPath);
    if (!execFrame.isVisible()) {
      execFrame.setVisible(true);
      execFrame.toFront();
    }
  }
 else {
    if (execFrame.isVisible()) {
      execFrame.clearMessage();
      execFrame.clearListing();
      execFrame.clearBreakpoints();
      execFrame.setTitle("String_Node_Str");
      execFrame.setVisible(false);
    }
    if (printoutFrame.isVisible()) {
      printoutFrame.setTitle("String_Node_Str");
      printoutFrame.setVisible(false);
    }
  }
}
Program: 37688
Project: 37688
Buggy source:
private boolean handleUnit(String unitName,JCheckBox checkBox,JTextField filePath){
  if (checkBox.isSelected()) {
    String path=filePath.getText().trim();
    if (path.length() > 0) {
      DataOptions.unitCommands.add("String_Node_Str" + unitName + "String_Node_Str"+ path);
      return true;
    }
 else {
      messageText.setForeground(ExecFrame.DARK_RED);
      messageText.setText("String_Node_Str" + unitName + "String_Node_Str");
      return false;
    }
  }
 else {
    DataOptions.unitCommands.add("String_Node_Str" + unitName);
    return true;
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private boolean handleUnit(String unitName,JCheckBox checkBox,JTextField filePath){
  if (checkBox.isSelected()) {
    String path=filePath.getText().trim();
    if (path.length() > 0) {
      DataOptions.unitCommands.add("String_Node_Str" + unitName + "String_Node_Str"+ path);
      return true;
    }
 else {
      messageText.setForeground(ExecFrame.DARK_RED);
      messageText.setText("String_Node_Str" + unitName + "String_Node_Str");
      return false;
    }
  }
 else {
    return true;
  }
}
Program: 37689
Project: 37689
Buggy source:
private boolean OkAction(){
  DataOptions.inputPath=readerCheckBox.isSelected() ? loadCardData() : AssemblerOptions.objectPath;
  DataOptions.unitCommands=new ArrayList();
  return handleUnit("String_Node_Str",punchCheckBox,punchTextField) && handleUnit("String_Node_Str",tape1CheckBox,tape1TextField) && handleUnit("String_Node_Str",tape2CheckBox,tape2TextField)&& handleUnit("String_Node_Str",tape3CheckBox,tape3TextField)&& handleUnit("String_Node_Str",tape4CheckBox,tape4TextField)&& handleUnit("String_Node_Str",tape5CheckBox,tape5TextField)&& handleUnit("String_Node_Str",tape6CheckBox,tape6TextField);
}

Fixed version (ground truth):
private boolean OkAction(){
  if (readerCheckBox.isSelected() && DataOptions.readerPath == null) {
    messageText.setForeground(ExecFrame.DARK_RED);
    messageText.setText("String_Node_Str");
    return false;
  }
  DataOptions.inputPath=readerCheckBox.isSelected() ? loadCardData() : AssemblerOptions.objectPath;
  DataOptions.unitCommands=new ArrayList();
  return (handleUnit("String_Node_Str",punchCheckBox,punchTextField) && handleUnit("String_Node_Str",tape1CheckBox,tape1TextField) && handleUnit("String_Node_Str",tape2CheckBox,tape2TextField)&& handleUnit("String_Node_Str",tape3CheckBox,tape3TextField)&& handleUnit("String_Node_Str",tape4CheckBox,tape4TextField)&& handleUnit("String_Node_Str",tape5CheckBox,tape5TextField)&& handleUnit("String_Node_Str",tape6CheckBox,tape6TextField));
}