Program: 137535
Project: 137535
Buggy source:
/** 
 * DOC yyin Comment method "setUp".
 * @throws java.lang.Exception
 */
@Before public void setUp() throws Exception {
  jrxmlItem=PropertiesFactory.eINSTANCE.createTDQJrxmlItem();
  EMFUtil emfUtil=new EMFUtil();
  File position=new File("String_Node_Str");
  file=new File(position.getAbsolutePath() + File.separator + "String_Node_Str");
  writeToFile("String_Node_Str");
  ResourceSet rs=emfUtil.getResourceSet();
  ByteArray byteArray=org.talend.core.model.properties.PropertiesFactory.eINSTANCE.createByteArray();
  byteArray.setInnerContentFromFile(file);
  byteArrayResource=new ByteArrayResource(URI.createFileURI(file.getAbsolutePath()));
  byteArrayResource.getContents().add(byteArray);
  rs.getResources().add(byteArrayResource);
  org.talend.core.model.properties.Property fileProperty=org.talend.core.model.properties.PropertiesFactory.eINSTANCE.createProperty();
  fileProperty.setId(EcoreUtil.generateUUID());
  fileProperty.setItem(jrxmlItem);
  fileProperty.setLabel("String_Node_Str");
  jrxmlItem.setName("String_Node_Str");
  jrxmlItem.setProperty(fileProperty);
  ItemState itemState=org.talend.core.model.properties.PropertiesFactory.eINSTANCE.createItemState();
  itemState.setPath("String_Node_Str");
  jrxmlItem.setState(itemState);
  File property=new File(position.getAbsolutePath() + File.separator + "String_Node_Str");
  Resource propertyResource=emfUtil.getResourceSet().createResource(URI.createFileURI(property.getAbsolutePath()));
  propertyResource.getContents().add(jrxmlItem.getProperty());
  propertyResource.getContents().add(jrxmlItem.getState());
  propertyResource.getContents().add(jrxmlItem);
  rs.getResources().add(propertyResource);
  byteArrayResource.load(null);
  jrxmlItem.setContent(byteArray);
  emfUtil.save();
}

Fixed version (ground truth):
/** 
 * DOC yyin Comment method "setUp".
 * @throws java.lang.Exception
 */
@Before public void setUp() throws Exception {
  jrxmlItem=PropertiesFactory.eINSTANCE.createTDQJrxmlItem();
  EMFUtil emfUtil=new EMFUtil();
  file=new File("String_Node_Str");
  writeToFile("String_Node_Str");
  ResourceSet rs=emfUtil.getResourceSet();
  ByteArray byteArray=org.talend.core.model.properties.PropertiesFactory.eINSTANCE.createByteArray();
  byteArray.setInnerContentFromFile(file);
  byteArrayResource=new ByteArrayResource(URI.createFileURI(file.getAbsolutePath()));
  byteArrayResource.getContents().add(byteArray);
  rs.getResources().add(byteArrayResource);
  org.talend.core.model.properties.Property fileProperty=org.talend.core.model.properties.PropertiesFactory.eINSTANCE.createProperty();
  fileProperty.setId(EcoreUtil.generateUUID());
  fileProperty.setItem(jrxmlItem);
  fileProperty.setLabel("String_Node_Str");
  jrxmlItem.setName("String_Node_Str");
  jrxmlItem.setProperty(fileProperty);
  ItemState itemState=org.talend.core.model.properties.PropertiesFactory.eINSTANCE.createItemState();
  itemState.setPath("String_Node_Str");
  jrxmlItem.setState(itemState);
  File property=new File("String_Node_Str");
  Resource propertyResource=emfUtil.getResourceSet().createResource(URI.createFileURI(property.getAbsolutePath()));
  propertyResource.getContents().add(jrxmlItem.getProperty());
  propertyResource.getContents().add(jrxmlItem.getState());
  propertyResource.getContents().add(jrxmlItem);
  rs.getResources().add(propertyResource);
  byteArrayResource.load(null);
  jrxmlItem.setContent(byteArray);
  emfUtil.save();
}